Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 21, 2012 02:21 AM by chetan.sarode
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" >
All-Star
22367 Points
2704 Posts
Microsoft
Feb 21, 2012 12:40 AM|LINK
Hello
Suppose that your CalendarExtender's ID is CalendarExtender1, then try
$find('CalendarExtender1').set_selectedDate(Date())
65619 Points
11118 Posts
Feb 21, 2012 02:21 AM|LINK
Hi, Please refer this similar thread
http://forums.asp.net/t/1213562.aspx/1
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
BU XI - MSFT
All-Star
22367 Points
2704 Posts
Microsoft
Re: Set Ajax CalendarExtender startdate to the clients current date
Feb 21, 2012 12:40 AM|LINK
Hello
Suppose that your CalendarExtender's ID is CalendarExtender1, then try
$find('CalendarExtender1').set_selectedDate(Date())
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework
chetan.sarod...
All-Star
65619 Points
11118 Posts
Re: Set Ajax CalendarExtender startdate to the clients current date
Feb 21, 2012 02:21 AM|LINK
Hi, Please refer this similar thread
http://forums.asp.net/t/1213562.aspx/1
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.