WPF Datepicker shows text before any date selected and that ‘Select a Date’
Now, if you working with custom template or other language or whatever,
You can do that while overwriting the Control template,
Than it founds interesting unit called PART_TextBox of type > DatePickerTextBox
Well, this control present the selected Date as a Text, and whatever you will set in this section of template will be the startup text instead of ‘Select a Date’ like ‘peek some date’
The problem is, lets say you set any date than you want to reset your Form, I mean to return this control to its original nature, now the control decided to manage your text and return the text to of ‘Select a Date’ instate of the text you have been placed in its template
(‘peek some date’). The problem is even deeper since you can try almost anything, like subscribe the Selection-Date-Change and again overwrite this text , but nothing.
The solution is an hookup a little. I am taking pointer to this DatePickerTextBox and than to its TextChenged event.
And check whatever you want , the default is null or empty (when setting the control selected date to null, it raise the bug .. and reset to default), And from other Thread call that control and manipulate its text again to what we need.