Vuepic / vue-datepicker

Datepicker component for Vue 3
https://vue3datepicker.com
MIT License
1.38k stars 137 forks source link

Time flow on user open time menu only #921

Closed faizaaulia closed 1 week ago

faizaaulia commented 2 weeks ago

Bug 1

Describe the bug Currently I set the flow to ['date', 'time', 'minutes'], when I change the hour using the arrow it will directly change to the next step. What I expect is the time/minute flow will be change to the next step if the user change the time/hour via the hour/minute overlay menu (pic 1), not on change via arrow click

To Reproduce Steps to reproduce the behavior:

  1. Go to StackBlitz playground
  2. Click on date input
  3. Pick a date
  4. The time menu overlay will open
  5. Click on arrow up/down of hour
  6. The minute menu overlay will open

Expected behavior The expected behavior after step 5 is the minute menu overlay will not open. So the next flow of minute will be run only if the user click the hour button (pic 2) then pick an hour

Screenshots

Bug 2

Describe the bug When using flow ['date', 'time', 'minutes'], after user pick a date, it will open the time menu overlay. But when the user decide to change the minute instead of the hour (click the minute button and pick a minute), then the minute menu overlay will reopen.

To Reproduce

  1. Go to StackBlitz playground
  2. Click on date input
  3. Pick a date
  4. The time menu overlay will open
  5. Click the minute button
  6. Minute menu overlay will open
  7. Click on a minute
  8. Minute menu overlay close & reopen

Expected behavior After step 7, the minute menu overlay has to close without reopen the minute menu overlay

Note: I expect a flow something like this

  1. Click input date
  2. Will show calendar to pick a date
  3. Pick a date
  4. Will open the time menu
  5. If user change the hour/minute via arrow button, I expect the flow will not trigger
  6. If the user change the hour first (via clicking the hour), then it will trigger the flow to open the minute menu
  7. If the user change the minute first (via clicking the minute), then then flow will not trigger that causing to reopen the minute menu

Is that scenario possible? Or am I wrong in setting the flow prop?

Desktop & mobile (please complete the following information):

Jasenkoo commented 1 week ago

These are very edge cases, in any case, you should not combine time with hours | minutes | seconds, but use one instead.

If you really want to make it work, you can do it manually by calling an overlay method based on specific events.

faizaaulia commented 1 week ago

hi @Jasenkoo , can I hide this arrow button in time menu? image