Skip to content
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

[Bug]: Date Picker using DateTime and range option resets time after every select #5053

Closed
DeadlyEmu opened this issue Oct 10, 2023 · 2 comments
Assignees
Labels
Type: Bug 🐞 Something isn't working
Milestone

Comments

@DeadlyEmu
Copy link

DeadlyEmu commented Oct 10, 2023

Blazorise Version

1.3.1

What Blazorise provider are you running on?

Bootstrap4

Link to minimal reproduction, or a simple code snippet

 <Addons>
     <Addon AddonType="AddonType.Body">
         <DatePicker Width="Width.Is25" DisabledDates="@disabledDates" @ref="@datePicker" TValue="DateTime?" InputMode="DateInputMode.DateTime" SelectionMode="DateInputSelectionMode.Range" Dates="selectedDates" DatesChanged="@ChangedDates" TimeAs24hr=true   />
     </Addon>
     <Addon AddonType="AddonType.End">
         <Button Color="Color.Light" Clicked="@(()=>datePicker.ToggleAsync())">
             <Icon Name="IconName.CalendarDay" />
         </Button>
     </Addon>
 </Addons>

Steps to reproduce

https://gyazo.com/5f165711dc278b611b86df738ae24421

What is expected?

Date Picker in single mode not changing time

https://gyazo.com/1e39d2793b79eb92abdf5a4a947c3c6c

What is actually happening?

if using Date Time in Datepicker in range mode. When you change any of the dates the times auto sets the time to to 12:00. Can this be made to not adjust times unless by the user?

What browsers are you seeing the problem on?

No response

Any additional comments?

No response

@DeadlyEmu DeadlyEmu added the Type: Bug 🐞 Something isn't working label Oct 10, 2023
@David-Moreira David-Moreira added this to the 1.3 support milestone Oct 10, 2023
@stsrki
Copy link
Collaborator

stsrki commented Oct 14, 2023

After an investigation on our part, I don't think this behavior is necessarily a bug. When working in single mode, we essentially only update part of the DateTime value, ie. date or time.

But in range mode, every time you make a selection, the range array restarts with the new datetime values without any reference to the previously selected values.

@DeadlyEmu
Copy link
Author

No worries, was worth checking. I have split this up into two single selections to get around the problem

Thanks

@stsrki stsrki closed this as completed Oct 17, 2023
@stsrki stsrki added this to Support Aug 3, 2024
@stsrki stsrki moved this to ✔ Done in Support Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐞 Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants