Yii Framework Forum: Problem With maxDate On YiiWheels WHDAtePicker - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Problem With maxDate On YiiWheels WHDAtePicker

#1 User is offline   RichardShearer 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 23-March 15

Posted 23 March 2015 - 02:53 PM

Hi All,

I've been using Yii for about a year now and have come across a problem with WhDatePicker that I'm hoping the combined knowledge in your heads might prevail..

I have a Date picker for using yiiwheels as follows"
$today = date('Y-m-d');
            $this->widget(
                'yiiwheels.widgets.datepicker.WhDatePicker',
                array(
                    'name' => 'BookingPayment[date_of_payment]',
                    'id' => 'bookingPayment_date_of_payment',
                    'value' => $model->date_of_payment,                    	            
                    'pluginOptions' => array('format' => 'yyyy-mm-dd'),
	            'htmlOptions' => array('placeholder' => 'Click To Select Date', 'class' => "required-input", 'readonly'=>'readonly'),
                )
            );


I'm trying to limit the input date to any date prior to today.

I've tried "maxDate"=>$today, on its own, in pluginOptions and in htmlOption, but with no luck.

With the low level of documentation with the entire yiiwheels set, would anyone be able to shed some light?

Cheers

Richard
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users