This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
When I bind a DateTime to the Value of the DateTimePicker and set the Format to ShortTime Then I edit the Time. When all is done the Time is correctly edited but the Date is set to Today and not the original Date bound to the control. Is there away around this? |
|
|
There isn't currently a way around this: the DateTimePicker assumes that if all you're showing is the time then the time is all that's of interest (and that if the date was significant you would have included that in the format). So the only workaround is to use a format which displays both date and time. But if you need the ability to edit a time of day, where the date is significant but shouldn't be editable, we'd be happy to take a look at getting the control to preserve the "non-editable" bits of the DateTime. |
|
|
I am interested but I will roll my own TextBoxTimeEditor as I need it to work tomorrow. My goal was to have a DropDownDateTimeEditor where you could edit a time and dropdown to edit the date. All possible just not out of the box. |
|
|
I've committed a change that should address this issue. If you want to try it out so as to maybe save rolling your own, let me know and I'll see if we can push out the build now. |
|
|
Sure I would like to try it. |
|
|
Okay, it should be up now. |
|
|
Everything works great. I can now change the Date and Time with the DropDownDatePicker with Format = ShortDate. One more wish is to have the Calendar in DropDownDatePicker not set the time to 12:00 AM when the user changes the date. Though you might want to make this an Option Flag. Because I can see how some would want the time to be cleared in most scenarios. |
|
|
Also To increase users speed of entry it would be great if the left and right arrows moved between fields in the DateTimePicker. (ex: moving between hours and minutes and AM/PM) And when moving fields they were automatically "highlighted/selected" so you didn't have to manually highlight/clear the old value. |
|
|
We can make the calendar preserve time of day, but we'd like to get some feedback first on the expected behaviour of the Today button. Should it also preserve the time of day, or set it to the current time (i.e. effectively a Now button)? Re navigation: users can use the Tab key to navigate through the fields, and this will result in automatic selection of the text. We prefer this to the use of the arrow keys though we can look at adding arrow key support if it is a high priority for you. (Also the Tab key currently only works forward -- you can't go backward using Shift+Tab as you would expect -- this is a bug and we will see if we can get it fixed for you.) |
|
|
I think it all depends on the Today button. In my scenario Time of Day should be preserved. But I can think of others where I would want it to be set to Now or Cleared.I If you look at the Today Property on DateTime Time of Day is Cleared vs the Now property. Though I would say keep Time preserved because MonthCalendar has no relation to Time and how do you know if Time is important or not. My thoughts ... The ultimate solution is one where you could configure your own behavior by setting Enum Properites.
As for the Arrow Keys I can derive my own behavior. The reason I want to use arrows is to match the behavior of a popular WPF DataGrid. Tab on the Grid moves control out of the grid to the next frameworkelement (unless in edit mode then it moves to the next cell) |
|
|
Any Status on the Month Calendar changing the Time (or not changing the time)? |
|
|
The Month Calendar in the dropdown date picker when the format is set to ShortTime, I mean? |
|
|
Sorry about the delay on this. I have committed support for this and it will be in nightly builds dated 27 Aug 2009 and above. For now, I have changed it so that the calendar controls (including DropDownDatePicker) always preserve time. This is a potentially incompatible change so if it causes issues for other customers then I will need to revert this behaviour and make time preservation an explicit option governed by an enum. I will post in this thread if this happens so that you can update your code. For the Today button, I have added a TodayButtonTimeAction property to both MonthCalendar and DropDownDatePicker. The default is Zero, meaning the time of day will be zeroed. The other options are Preserve (your desired behaviour) and Now. As always, please let us know if you run into any bugs or issues. |
|
|
This is a nice change, actually closed an item I had in my dev database that my client logged! My feedback is this is better, changing the date shouldn't automatically reset the time, at least in my app, and this new change works well. Sean |
|
|
Sorry I forgot to reply. The change is great. Thank you |
|