I am building a silverlight 4 application and the user wants to have a autocompelte feature for
date controls. ( Note I am using the DatePicker). For e.g. when the user types 5 and tabs out
the date should be converted to 5’th of sept 2012 becuase 5’th august has gone past. I also have
some other rules that are in place for this date formation. I planned to write some code
for this one in the KeyUp event but I am unable to get the text that the user has entered in the
datepicker. Also TextInputStart and TextInputUpdate are never called in my case.
I am looking for the correct event in which I can get what the user has entered
Thanks
Amol
I had a similar problem once with the
DatePickerof the Silverlight Toolkit. The only way I could solve that was to create a newUserControlusing a standardTextBoxand aDatePicker. I re-styled theDatePickerso that its default text area remained hidden, and replaced it by the standardTextBox.I wired the
DatePicker‘sSelectedDate-Property to theText-Property of theTextBox, so that it would get updated once someone picks a date.In your case you could use the
AutoCompleteBoxcoming with the Toolkit instead of a standardTextBoxand then use some clever logic to prefill the list of auto-complete proposals. Thus your control would look like a standardDatePicker, and mostly behave like one, but would provide a mixed functionality ofDatePicker,TextBoxandAutoCompleteBox.