Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
3 Points
4 Posts
Feb 18, 2012 06:32 PM|LINK
Objective: Set Ajax CalendarExtender startdate to the clients current date
On the start of the application or content page
Need the client date to be the start date of the calendar
I’ve seen how the selected date can be set via Javascript
It is using the sender._selectedDate to be set the client date
Is there a sender._startDate that can be on the loading of the page?
Ex:Set the selected date on the OnClientDateSelectionChanged
function checkDate(sender, args) {
if (sender._selectedDate < new Date()) {
alert("You cannot select a day earlier than today!");
sender._selectedDate = new Date();
sender._textbox.set_Value(sender._selectedDate.format(sender._format))
}
<asp:CalendarExtender ID="CalendarExtender1"
runat="server"
TargetControlID="txtStartDate"
PopupButtonID="ImageButton1"
OnClientDateSelectionChanged="checkDate" >
</asp:CalendarExtender
Something like
if (sender._StartDate < new Date()) {
sender._STartDate = new Date();
OnClientShowing="checkDate" >
sjwm1225
Member
3 Points
4 Posts
Set Ajax CalendarExtender startdate to the clients current date
Feb 18, 2012 06:32 PM|LINK
Objective: Set Ajax CalendarExtender startdate to the clients current date
On the start of the application or content page
Need the client date to be the start date of the calendar
I’ve seen how the selected date can be set via Javascript
It is using the sender._selectedDate to be set the client date
Is there a sender._startDate that can be on the loading of the page?
Ex:Set the selected date on the OnClientDateSelectionChanged
function checkDate(sender, args) {
if (sender._selectedDate < new Date()) {
alert("You cannot select a day earlier than today!");
sender._selectedDate = new Date();
sender._textbox.set_Value(sender._selectedDate.format(sender._format))
}
}
<asp:CalendarExtender ID="CalendarExtender1"
runat="server"
TargetControlID="txtStartDate"
PopupButtonID="ImageButton1"
OnClientDateSelectionChanged="checkDate" >
</asp:CalendarExtender
Something like
function checkDate(sender, args) {
if (sender._StartDate < new Date()) {
alert("You cannot select a day earlier than today!");
sender._STartDate = new Date();
}
}
<asp:CalendarExtender ID="CalendarExtender1"
runat="server"
TargetControlID="txtStartDate"
PopupButtonID="ImageButton1"
OnClientShowing="checkDate" >
</asp:CalendarExtender