Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

The Dialog Can't Pop Up When The Date Validation Is Invalid

$
0
0
I am a new Yii user, I have a problem when I would like to build a website. My website has a part which is required the user input the start date and end date, I want to have one function, if the end date is set before the start date, it will show a dialog box to warn the user automatically, but I can't do that. Have any idea to do that?

Here is my code of the two date text fields:
<td>Start
    <?php 

            $this->widget('zii.widgets.jui.CJuiDatePicker', array(
            'name'=>'COURSE_START_DATE',
            'model'=>$Cmodel,
            'attribute'=>'COURSE_START_DATE',
            'language'=>Yii::app()->language=='en_us',

            'options'=>array(
                'showAnim'=>'fold', // 'show' (the default), 'slideDown', 'fadeIn', 'fold'
                'showOn'=>'button', // 'focus', 'button', 'both'
                'buttonText'=>Yii::t('ui','Calendar'),
                'buttonImage'=>Yii::app()->request->baseUrl.'/images/calendar.png',
                'buttonImageOnly'=>true,
            ),
    )
        ?></td>

     <td>End 
    <?php 
        $this->widget('zii.widgets.jui.CJuiDatePicker', array(
            'name'=>'COURSE_END_DATE',
            'model'=>$Cmodel,
            'attribute'=>'COURSE_END_DATE',
            'language'=>Yii::app()->language=='en_us',
            'options'=>array(
                'showAnim'=>'fold', // 'show' (the default), 'slideDown', 'fadeIn', 'fold'
                'showOn'=>'button', // 'focus', 'button', 'both'
                'buttonText'=>Yii::t('ui','Calendar'),
                'buttonImage'=>Yii::app()->request->baseUrl.'/images/calendar.png',
                'buttonImageOnly'=>true,

            ),
        ));

        ?>

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>