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

Calendar in timeonly mode ignores minDate, maxDate #1716

Closed
Rakasch opened this issue Oct 29, 2021 · 0 comments
Closed

Calendar in timeonly mode ignores minDate, maxDate #1716

Rakasch opened this issue Oct 29, 2021 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working vue2-portable
Milestone

Comments

@Rakasch
Copy link
Contributor

Rakasch commented Oct 29, 2021

What is the motivation / use case for changing the behavior?
I have a Calendar component in timeonly mode.
I added minDate and maxDate, so you can only enter times between those two values.

CodeSandbox examples
https://codesandbox.io/s/calendar-time-input-wru8y?file=/src/CalendarDemo.vue

I've added two examples in codesandbox.

Example 1
Example 1 has an initial value set, that is within the allowed timespan.

Expected Behaviour:

  • I can manually write a valid time in the text field.

Current behavior:

  • Every manually entered value is treated as invalid. The text field is emptied.

Notice: It's working correctly, if I use the buttons of the popup.

Example 2
Example 2 does not have an initial value.

Expected Behaviour:

  • Entering a time (popup or manually), should create a new modelValue Date within the valid timespan.

Current behavior:

  • The created date is always today, which is outside of the valid timespan.
  • Additionally, the limitation for the entered time through minDate and maxDate does not work anymore.

Vue version: 3.2.20

PrimeVue version: 3.8.2

@Rakasch Rakasch changed the title Bugreport - Calendar in timeonly mode partly ignores minDate, maxDate Bugreport - Calendar in timeonly mode ignores minDate, maxDate Oct 29, 2021
@cagataycivici cagataycivici self-assigned this Nov 17, 2021
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Nov 17, 2021
@cagataycivici cagataycivici added this to the 3.9.0 milestone Nov 17, 2021
@cagataycivici cagataycivici changed the title Bugreport - Calendar in timeonly mode ignores minDate, maxDate Calendar in timeonly mode ignores minDate, maxDate Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working vue2-portable
Projects
None yet
Development

No branches or pull requests

3 participants