Skip to content

[BUG] Date displayed does not correspond to JS Date-object specified #411

@gabrielleonabegg

Description

@gabrielleonabegg

Description
The Vanilla Calendar Pro widget does not show the correct date when the JS Object Date is used. It works seamlessly with the String-format-

Steps to reproduce

  1. Use the latest version of Vanilla Calendar Pro.
  2. Add selectedDates: [date] to the settings. date must be a JS Date object.
  3. Use date.toDateString() and log to the console to see the expected date
  4. Compare the log with the selected date in the widget. They are not the same

Expected behavior
The two dates should be the same.

CodeSandbox example
JSFiddle:
https://jsfiddle.net/ganymede_0g/27s9tbrq/4/

CodeSandbox:
https://codesandbox.io/p/sandbox/gq69jn

Screenshots (optional)

Image

Works very nicely apart from this bug. Thank you a lot for this great tool!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions