Skip to content

Calendar doesn't scroll when valueModel changed #47

@oleksandr-hyriavets

Description

@oleksandr-hyriavets

Describe the bug
I'm trying to implement custom preset logic. When I select preset in my own input type="select", I change the value prop passed to the Datepicker component. Chosen range highlights in the calendar but there is no scroll to the start of that range.

To Reproduce

  • create datepicker and pass following props: { inline: true, autoApply: true, range: true, multiCalendars: true }
  • try to change valueModel programmatically to dates that are outside the current view

Expected behavior
View changes to the start of newly selected range (exactly as when using the existing presetRanges prop)

Desktop & mobile (please complete the following information):

  • Browser chrome
  • Library version 3.2.0

https://stackblitz.com/edit/vuepic-vue-datepicker-gh1jwr?file=src/components/Playground.vue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions