When I first open my window, which uses the wpf toolkit date, it has today's date highlighted in the calendar, but nothing in the corresponding text box (expect the water sign in mm / dd / yyyy).
I want to reset the datepick to this initial state after the user selects the date and "sends", so when they use it again, it is not on the date they previously selected. For example, if a person selects a date after 2 months, when it is reset, the text box is the watermark mm / dd / yyyy, and when the calendar opens, it starts from today as βstart dateβ.
I tried various combinations of the following, but this does not reset the text:
//set date to today so it move the calendar to this date mydatepicker.SelectedDate = DateTime.Now; //reset since we don't want a date selected mydatepicker.SelectedDate = null; //reset the text mydatepicker.Text = string.Empty;
If I reset only text, the calendar (selected date \ start) will not reset. But if I set the calendar, the text is updated, not just the watermark.
Any ideas?
thanks
source share