-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DateTimePicker changes date to 1/1/0001 when selecting time first #3746
Comments
Unsure if this is related but also when ever I use DateTimePicker in alpha, I get these three binding errors:
|
@didster Are you targeting .Net Framework 4.8? If yes, then it's a problem there. |
@punker76 No, I'm targeting .NET Core 3.1. I have also tried Core 3.0, same result. The non-alpha project using 1.6.5 targets Framework 4.7.2 and works fine. I have not tried 4.8. I have also just tried using Framework 4.7.2 and the alpha version just out of interest. No binding errors shown, but the original reported problem of the date showing 1/1/0001 when you change the time is still exhibited so I guess they are not related anyway. |
A further point for this is I hadn't noticed is that it does the same in reverse when you select the date first - the time time resets to 00:00. |
+1 for this fix as the control is pretty much unusable currently. Is their an ETA? Many thanks. |
…icker - if the Time is selected before a Date is selected use DateTime.Today instead of DateTime.Min - If a new Value is selected from the Calendar we use the already Selected time. - Implemented a new private `bool` to disable changing the time.
…rmark, Fix wrong focus for popup content
…s for the PopUp content
…icker - if the Time is selected before a Date is selected use DateTime.Today instead of DateTime.Min - If a new Value is selected from the Calendar we use the already Selected time. - Implemented a new private `bool` to disable changing the time.
…rmark, Fix wrong focus for popup content
…s for the PopUp content
…icker - if the Time is selected before a Date is selected use DateTime.Today instead of DateTime.Min - If a new Value is selected from the Calendar we use the already Selected time. - Implemented a new private `bool` to disable changing the time.
…rmark, Fix wrong focus for popup content
…s for the PopUp content
…icker - if the Time is selected before a Date is selected use DateTime.Today instead of DateTime.Min - If a new Value is selected from the Calendar we use the already Selected time. - Implemented a new private `bool` to disable changing the time.
…rmark, Fix wrong focus for popup content
…s for the PopUp content
…rmark, Fix wrong focus for popup content
…s for the PopUp content
…ntrols.TimePickerBase' as owner
…se RoutedPropertyChangedEventHandler and RoutedPropertyChangedEventArgs
…reaks time selection and more...
…icker - if the Time is selected before a Date is selected use DateTime.Today instead of DateTime.Min - If a new Value is selected from the Calendar we use the already Selected time. - Implemented a new private `bool` to disable changing the time.
…rmark, Fix wrong focus for popup content
…s for the PopUp content
…ntrols.TimePickerBase' as owner
…se RoutedPropertyChangedEventHandler and RoutedPropertyChangedEventArgs
…reaks time selection and more...
(GH-3746) Fix Date and Time selection and other improvements for DateTimePicker
@didster The BindingExpression error has now been fixed, and it will be released in the next version of MahApps.Metro |
Firstly great work!
Using DateTimePicker in 2.0.0-alpha0660
Selecting a time from the dropdown before selecting the date changes the date to 01/01/0001.
DateTimePicker is bound to a nullable date time. Same occurs when DateTimePicker is not bound to anything at all actually.
It works fine in 1.6.5 where selecting the time first still results in the textbox saying "select a date"
I must target .net core, so sadly can't use 1.6.5
Here is an example of both
Doesnt work using 2.0.0 alpha
Works using 1.6.5
The text was updated successfully, but these errors were encountered: