Skip to content

@range-start and @range-end events don't include the time set for the range #1142

Open
@ZsharE

Description

@ZsharE

Describe the bug
@range-start and @range-end events don't include the time set for the range.
It doesn't make sense to select the same date with the same time twice.

To Reproduce
Demo: https://stackblitz.com/edit/vuepic-vue-datepicker-vfkxhquh?file=src%2Fcomponents%2FPlayground.vue

Expected behavior
The @range-start and @range-end events should reflect the selected time for the start and end of the range.
At the moment, both events return the correct date, but with the time always set to 00:00:00.

Desktop & mobile (please complete the following information):

  • Browser: all browsers
  • Library version: 11.0.2

What I want to achieve
Is there any other way to get the range-start and range-end when the range or time is changing, without actually selecting the range?
I want to be able to select a preset date when the selected interval is the same as that date. Because the time is set to 00:00:00, this is not possible.

Image

{
  label: 'Yesterday',
  value: [
    startOfDay(subDays(new Date(), 1)),
    endOfDay(subDays(new Date(), 1))
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting triageThe issue is not reviewed by the maintainersbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions