Well, would you object to just setting the end date to the same day as the beginning date? That will cause the calendar in the end date to open to the same month as the start date.
In the "exit" event for the start date add this code.
if (dfEndDate.isNull) dfEndDate.rawValue = this.rawValue;
This will cause the date to populate automatically for the end date.
For the second question, you can add code to do this. It's kinda lengthy, so be prepared. Also, it doesn't make the date look pretty until you select it on the calendar scroll. Add this to the enter event of bill date.
if (this.isNull) {
if (dfEndDate.rawValue.slice(5,7)!="12") {
var nextMonth = Number(dfEndDate.rawValue.slice(5,7))+1;
var fulldate = dfEndDate.rawValue.slice(0,5) + nextMonth + dfEndDate.rawValue.slice(7);
this.rawValue = fulldate;
}
else {
var nextMonth = "-01";
var nextYear = Number(dfEndDate.rawValue.slice(0,4))+1;
var fullDate = nextYear + nextMonth + dfEndDate.rawValue.slice(7);
this.rawValue = fullDate;
}
}
Message was edited by: jasotastic81 --Whoops! told you to put that in the wrong place.