User (Old forums)MemberFebruary 23, 2007 at 8:25 amPost count: 23064
I am using the DatePicker in a few forms in my application, and binding the SelectedDate property to a Nullable<DateTime> property of my objects. There are a few problems I have encountered.
1. Invalid Dates
If I enter an invalid date (such at 56/56/56) into the datepicker, and tab away, nothing happens. The text remains there but there is no date selected and the setter of my bound property never gets called.
I’m not sure what should happen but would perhaps expect the date to reset to null and the text to clear? Please let me know how I can get round this.
If you tab into the datepicker then you can’t immediately start typing a date. You have to actually click into one of the AutoSelectTextBoxes in order to do anything. Also in terms of the mouse, clicking on the border does not give focus to the control – you have to click on one of the text boxes or the toggle button.
I have managed to get round the keyboard focus issue by handling PreviewTextInput and setting focus on the textbox called “DayEdit”.
Imported from legacy forums. Posted by nmosafi (had 4751 views)Xceed SupportMemberFebruary 23, 2007 at 9:06 amPost count: 5658
It was one of our design choices that when an invalid input is made into the DatePicker, that the SelectedDate property remains unchanged. This was to prevent “accidental” changes to the SelectedDate, which could then be “propagated” to anybody bound to the property.
I have filed a feature request to take into consideration that some users might want this behavior after all. I have no particular insight on how this might come out, but could be as simple as a property that enumerates the operation modes concerning invalid input.
As always, your suggestions on the matter are welcome.
This is not an intended behavior, I sent a bug report concerning this. Thank you for reporting it. Glad you could find a “workaround” until we fix this.
Imported from legacy forums. Posted by Marcus [Xceed] (had 271 views)User (Old forums)MemberFebruary 23, 2007 at 10:03 amPost count: 23064
Cheers – have you got any suggestions for how I could handle issue 1 in the mean time?
I just need a way to manually detect that there is an invalid date and handle it, maybe just resetting the displayed date back to the property value on lost focus so they remain in sync.
I guess at the worst I could handle the LostFocus and extract the date parts from the three textboxes and update them accordingly? Is there an easier way?
Out of interest, do you have a public list of known issues with workarounds or anything, preferably including which release they will or have be fixed in etc?
Imported from legacy forums. Posted by nmosafi (had 484 views)Xceed SupportMemberFebruary 23, 2007 at 12:58 pmPost count: 5658
Unfortunatly, the only suggestion I have would be to redo the DatePicker ControlTemplate and replace the DateInputScope present with your own specific class, which affects null to the DateOutput instead of leaving it as is when an invalid date is specified.
The unfortunate part is off course that we did not release the XAML files for the styles and templates of the Xceed.Wpf.Controls assembly.
My advice would be to use the tool <a href=”http://blogs.msdn.com/llobo/archive/2006/07/17/Tool-to-Examine-WPF-control-styles.aspx”>StyleSnooper from Lester Lobo</a> to get the Default style of the DatePicker and start from there…
Imported from legacy forums. Posted by Marcus [Xceed] (had 379 views)Odi [Xceed]SpectatorFebruary 23, 2007 at 1:42 pmPost count: 426
“Out of interest, do you have a public list of known issues with workarounds or anything, preferably including which release they will or have be fixed in etc?”
The major currently known issues are listed in the Readme file (it is in the start menu’s program group for the data grid), but the minor issues or bugs are not listed. When issues are fixed, we list the fixes in the <a href=”http://xceed.com/pages/TopMenu/Downloads/Updates.aspx?Lang=EN-CA”>Updates</a> page. There will be an update to this page, I expect, by the end of the day, listing the latest fixes to the data grid. The fixed bugs that make it in here are generally those submitted by users. There are internal issues and bug fixes also performed that don’t make it into that list.
As for when particular issues will be cleared, we have no public list to offer. This is information typically given (by our support staff) to the submitter of the bug or issue, to keep them informed of our progress. However, for users of Xceed DataGrid for WPF that submit issues here in the forums, you’ll have to ask about the bug fix you’re interested in that issue’s thread.
Imported from legacy forums. Posted by Odi [Xceed] (had 268 views)Xceed SupportMemberMarch 17, 2008 at 2:56 pmPost count: 5658
Both issues have been fixed and the package is available for <a href=”http://xceed.com/pages/TopMenu/Downloads/Updates.aspx”>download</a>.
Imported from legacy forums. Posted by CharlesB (had 5648 views)
- You must be logged in to reply to this topic.