Datepicker

hi all,

i got trouble for insert the selected start date and end date into database by using this method that i found.

this is the start date:


<div class="row">

                <?php echo $form->labelEx($modelBooking,'StartDate'); ?>

                <?php

                $this->widget('zii.widgets.jui.CJuiDatePicker', array(

                    'model' => $modelBooking,

                    'attribute' => 'StartDate',

                    'htmlOptions' => array(

                        'size' => '10',         // textField size

                        'maxlength' => '10',    // textField maxlength


                    ),

                  

                    

                ));

                ?>


        </div>



this is the end date:


<div class="row">

                <?php echo $form->labelEx($modelBooking,'EndDate'); ?>

                <?php

                $this->widget('zii.widgets.jui.CJuiDatePicker', array(

                    'model' => $modelBooking,

                    'attribute' => 'EndDate',

                    'htmlOptions' => array(

                        'size' => '10',         // textField size

                        'maxlength' => '10',    // textField maxlength


                    ),

                  

                    

                ));

                ?>


        </div>



in my controller:


public function actionProcessBooking() {

        $modelBooking = new Bookingdetail();

        $this->performAjaxValidation($modelBooking);


        $command = Yii::app()->db->createCommand();

        $command->insert('bookingdetail', array(

            

            'StartDate' => $_POST['BookingDetai']['StartDate'],

            'EndDate' => $_POST['Bookingdetail']['EndDate']


        ));

Hope anyone can help.I appreciate with anyone help.Thank and sorry for i just newly to yii.

public function actionProcessBooking()

{

&#036;modelBooking = new Bookingdetail();


&#036;this-&gt;performAjaxValidation(&#036;modelBooking);


&#036;modelBooking-&gt;StartDate = &#036;_POST['BookingDetai']['StartDate'];


&#036;modelBooking-&gt;EndDate =  &#036;_POST['BookingDetai']['EndDate'];


&#036;modelBooking-&gt;save();

}

i able to add the start date, but unable to insert the end date. it is got related with the datatype that i set in database?