I have a calendar control whose value I'm setting to null when the search form is cleared. The CalendarLayout.Reset command does what I need it to (sets back to current month and year); however, the defined style (skin file) is lost. I have tried various approaches to using the defined style but nothing is working with the exception of re-defining each setting in code.
Is there any way to use the defined style after resetting the control?
Thanks!
Reset is a control level method, which is going to put the control back to it's base state. It sounds like all you would need to do set the Value of the control back to DateTime.Now or null (whichever is the value of the control when you just drop it on the form).
I probably should have explained my problem a little better; so, I apologize for that. One of the things I had tried previously was to set the value to null. This does clear the form of any entered criteria. If using DateTime.Now, the value of today's date is displayed in the field which I don't want.
When a month and year are selected to populate the form field, that same month and year are displayed in the calendar dropdowns when the form values are cleared. What I would like to do is clear the form and have the calendar be reset to the current month and year. Hopefully, the images I attempted to attach will be displayed to help clarify the problem.
Hi Darrell,
That worked like a charm -- thank you so much
Hope you had a wonderful holiday season!
Oh, in that case you should set the CalendarLayout.VisibleMonth.
this.WebDateChooser1.CalendarLayout.VisibleMonth = DateTime.Now;