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

MonthPicker with max-date option #323

Closed
umang1995 opened this issue Mar 20, 2023 · 5 comments
Closed

MonthPicker with max-date option #323

umang1995 opened this issue Mar 20, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@umang1995
Copy link

Describe the bug
I am trying to use the component and its really good.
While validation, I observed that If i am keeping It as monthpicker and applying max-date = new Date() its not enabling the select button at all. I am using OptionsAPI in vue 3.
Code Below :
<VueDatePicker
v-model="date"
range
:month-picker="isMonth"
:year-picker="isYear"
@OPEN="updated_duration"
@close="getGroupsVehicles"
ref="myDatesPicker"
:format="formatDate"
:partial-range="false"
:no-today="true"
:multi-calendars="!isMonth && !isYear"
:clearable="false"
:enable-time-picker="false"
:prevent-min-max-navigation="true"
:ignoreTimeValidation="true"
:disableTimeRangeValidation="true"
>

To Reproduce
Steps to reproduce the behavior:

  1. Initialize the picker in month range mode.
  2. Feed it max-date
  3. Try to open the picker
  4. See error

Expected behavior
If the dates are selected properly, Select button should be enabled

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop & mobile (please complete the following information):

  • Browser [e.g. chrome, safari]
  • Library version [e.g. 3.0.0]
@umang1995 umang1995 added the bug Something isn't working label Mar 20, 2023
@umang1995
Copy link
Author

Okay an update, after checking various scenarios -
if we keep below conditions -

  1. partial range is false
  2. month picker
  3. enable time picker as false
  4. ignore time validation true
  5. disable timerange validation true
  6. selected date is feb 2023-feb 2023.

And keep maxDate as 31st march then its working as expected,
but when we change maxDate to 1st march then it behaves weirdly, and does not pass any validations.

@umang1995
Copy link
Author

@Jasenkoo I am trying to use this for my client project, and it solves all my problems other than this, Is there anything we can do to fast-track this?

@Jasenkoo
Copy link
Contributor

Fixed in 76507d2, adding as reference

@umang1995
Copy link
Author

@Jasenkoo Great man. You are Amazing. By when would this be released??

@Jasenkoo
Copy link
Contributor

Published, closing now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants