PDA

View Full Version : HOW TO SET CALALNDER"S DATE TO TOMORROW'S DATE



sachin sachdeva
11 Nov 2010, 1:14 AM
hello sir i am nave in a programing line and this time i want to know that how to start the calendar from tomorrow's date the code i am sending you shows the calendar with today's date but due to clients requirement i want this calendar to show next day date like shown in attached image


Ext.apply(Ext.form.VTypes, {
daterange : function(val, field) {
var date = field.parseDate(val);
var today = new Date().clearTime();


if (!date) {
return;
}
if (field.releaseDateField
&& (!this.dateRangeMax || (date.getTime() != this.dateRangeMax
.getTime()))) {
var start = Ext.getCmp(field.releaseDateField);
// start.setMaxValue(date);
// start.validate();
this.dateRangeMax = date;

} else if (field.expiryDateField
&& (!this.dateRangeMin || (date.getTime() != this.dateRangeMin
.getTime()))) {
var end = Ext.getCmp(field.expiryDateField);
end.setMinValue(date);
end.validate();
this.dateRangeMin = date;

}
return true;
}
});