Advertisement
christiansalazarh

update form having date

Aug 18th, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1.  public function actionUpdate($id)
  2.  {
  3.   $model=$this->loadModel($id);
  4.  
  5. // AQUI...pasar a fechaString lo que tiene el bigint fecha usando:
  6.   $model->fechaString = Yii::app()->format->formatDate($model->fecha);
  7.  
  8.    // Uncomment the following line if AJAX validation is needed
  9.   // $this->performAjaxValidation($model);
  10.  
  11.    if(isset($_POST['Prueba']))
  12.   {
  13.    $model->attributes=$_POST['Prueba'];
  14.    if($model->save())
  15.     $this->redirect(array('view','id'=>$model->idprueba));
  16.   }
  17.  
  18.    $this->render('update',array(
  19.    'model'=>$model,
  20.   ));
  21.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement