Hi! I want to have the default date be displayed on my textfield in my form using CJuiDatePicker. For example if i want to create a new customer the default birthdate would be displayed in the textfield automatic.
Hi! I want to have the default date be displayed on my textfield in my form using CJuiDatePicker. For example if i want to create a new customer the default birthdate would be displayed in the textfield automatic.
Hi moylua,
In your controller’s action, after where the new model is constructed, you can declare a default value for your birth date field. Here’s an example:
public function actionCreate()
{
$model = new Customer();
$model->birthdate = '1982-03-12';
// rest of your code here...
}
Thank You Sir It worked! I hope other members would also benefit from this