-
-
Notifications
You must be signed in to change notification settings - Fork 405
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
[Feature request] Range picker should emit event on first selected date #429
Labels
Comments
Same as #428 |
Yes, I'll add the feature in next version. |
This was referenced Mar 3, 2020
It'll emit a <date-picker
v-model="value"
range
placeholder="Select date range"
@pick="handlePick"
></date-picker> methods: {
handlePick(date) {
this.value = [date, new Date(date.getTime() + 30 * 24 * 3600 * 1000)]
},
},
|
mengxiong10
added a commit
that referenced
this issue
Mar 6, 2020
v3.4.0 added it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What problem does this feature solve?
It is not possible to listen to the
select
event which is emitted byCalendarPanel
inCalendarRange
. It would be awesome to get this possibility.Use case
For example we have a range picker, but it is possible to have a same-day range. A UX would be if the user could only pick once and we can add a computed property for the end date. Which would be by default the same date as the start date.
What does the proposed API look like?
Approach
Also emit the input event on the first date pick with
[start_date, null]
Approach
Emit the select event delegated from
CalendarPanel
toDatePicker
Thank you for your great work!
The text was updated successfully, but these errors were encountered: