Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

ajaxToolkit:CalendarExtender setting initial month displayed when calendar pops up

$
0
0

I have two textbox objects (FromDate and ToDate) on my page (in an UpdatePanel). Each is tied to separate CalendarExtender (CalendarExtenderFrom and CalendarExtenderTo). When I set a date value in theFromDate textbox that is some number of months in the past (I.E. 07/01/2013) I have code behind that sets the StartDate and EndDate on theToDate's CalendarExtender. This does work to provide a range of dates for the ToDate's CalendarExtender's popup such that the user cannot select a date prior to the FromDate value. However, when I then click in the ToDate textbox the calendar opens in the current month (I.E. April 2014). I want it to open in July 2013.

I know that if, in the code behind, I set CalendarExtenderTo.SelectedDate equal to the FromDate value then when I click in the ToDate's textbox the calendar opens in the month I want. However, Ido not want the ToDate's textbox to display that date or any date. I want ToDate to remain empty until the user actually selects something from the popup calendar. 

Is there some way to set the initial month/year a CalendarExtender displays without actually setting a value in the textbox associated with the CalendarExtender?


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>