hi i need to limite date select in datepicker(withn 30day)
i mean
[b]Example /b]
this is offer create table i want to add date limitation becouse offer publish withn month
when some select 1 September, 2013 in from row in form , he/she only can select date among 30 September, 2013
when some select 10 September, 2013 in from row in form , he/she only can select date among 09 October , 2013
my data table
CREATE TABLE IF NOT EXISTS offer_detail
(
id
int(60) NOT NULL AUTO_INCREMENT,
company_id
int(60) NOT NULL,
offertype_id
int(60) NOT NULL,
category_id
int(60) NOT NULL,
offer_title
varchar(150) NOT NULL,
offer_description
text NOT NULL,
image
varchar(150) NOT NULL,
coupon_id
varchar(60) NOT NULL,
price
text NOT NULL,
unit_id
varchar(60) NOT NULL,
price_now
varchar(60) NOT NULL,
[color="#FF0000"][b]from
varchar(80) NOT NULL,
to
varchar(80) NOT NULL,[/b][/color]
user_id
int(10) NOT NULL,
created
varchar(11) NOT NULL,
modified
varchar(10) NOT NULL,
Active
varchar(100) NOT NULL,
PRIMARY KEY (id
),
KEY company_id
(company_id
,category_id
,coupon_id
,unit_id
),
KEY category_id
(category_id
,coupon_id
,unit_id
),
KEY coupon_id
(coupon_id
),
KEY unit_id
(unit_id
),
KEY offertype_id
(offertype_id
),
KEY user_id
(user_id
,Active
)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT
this my view code about above row(which i highlight)
<b><?php echo $form->labelEx($model,‘from’); ?></b>
<?php
$this->widget(‘zii.widgets.jui.CJuiDatePicker’,
array(
'attribute'=>'from',
'model'=>$model,
'options' => array(
'mode'=>'focus',
'dateFormat'=>'d MM, yy',
'showAnim' => 'slideDown',
),
'htmlOptions'=>array('size'=>20,'class'=>'', 'value'=>date("d F, Y")),
)
);
?>
<?php echo $form->error($model,‘from’); ?>
…
<b><?php echo $form->labelEx($model,‘to’); ?></b>
<?php
$this->widget(‘zii.widgets.jui.CJuiDatePicker’,
array(
'attribute'=>'to',
'model'=>$model,
'options' => array(
'mode'=>'focus',
'dateFormat'=>'d MM, yy',
'showAnim' => 'slideDown',
),
'htmlOptions'=>array('size'=>20,'class'=>'', 'value'=>date("d F, Y")),
)
);
?>
<?php echo $form->error($model,‘to’); ?>
this screen shot about my view form