Hi All
I am setting the date from javascript using the following Code.
But when the page postback the date control is reset to its previous value.
I have also tried to assign date at server side in page load but in vain.
also note that the date control is in Update panel
Kindly help me out .
Best regards
faiq
I am setting the date from javascript using the following Code.
| function ProcessDateSelection(sender, e) |
| { |
| var DateControl= $find('<%= rdstartDate.ClientID %>'); |
| var EndDateControl= $find('<%= rdEndDate.ClientID %>'); |
| var EventType=getEventType(); |
| if(EventType==-1)//Daily |
| { |
| SetDefaultDate(EndDateControl); |
| var date = DateControl.get_selectedDate(); |
| date.setDate(date.getDate() ); |
| EndDateControl.set_minDate(date); |
| EndDateControl.set_maxDate(date); |
| EndDateControl.set_selectedDate(date); |
| } |
| if(EventType==0)//Daily |
| { |
| var date = DateControl.get_selectedDate(); |
| date.setDate(date.getDate() +1 ); |
| EndDateControl.set_minDate(date); |
| EndDateControl.set_selectedDate(date); |
| } |
| if(EventType==1)//Weekly |
| { |
| var date = DateControl.get_selectedDate(); |
| date.setDate(date.getDate() +7 ); |
| EndDateControl.set_minDate(date); |
| EndDateControl.set_selectedDate(date); |
| } |
| if(EventType==2)//Monthly |
| { |
| var date = DateControl.get_selectedDate(); |
| date.setMonth(date.getMonth() + 1 ); // Java script Month starts from JAnuary=0 |
| EndDateControl.set_minDate(date); |
| EndDateControl.set_selectedDate(date); |
| } |
| } |
But when the page postback the date control is reset to its previous value.
I have also tried to assign date at server side in page load but in vain.
also note that the date control is in Update panel
Kindly help me out .
Best regards
faiq