views:

92

answers:

1

I have a report where I am using jquery ui's datepicker for the start and end dates for the report data.

When a user pages through the data, I want the maintain the date ranges on the picker.

How can I do this?

Say I modify the url's for the next/previous buttons based on the values of the datepicker, how would I reset the datepicker values?

I would have to do it programatically i.e. inject javascript code that set's the datepicker, is that the best way?

I am using asp.net mvc

+1  A: 

The DatePicker control is bound to an input box, if you set the value of that input box to a date, the DatePicker will use that value when displaying it's UI.

So you could use the querystring to store the date range, and then when the page loads; parse the query string and set the values to the input box. Then initialise your DatePicker.

DaRKoN_