Litepicker icon indicating copy to clipboard operation
Litepicker copied to clipboard

Not Valid Date Object get from getStartDate() and getEndDate()

Open joshhsiao333 opened this issue 4 years ago • 1 comments

my config: picker = new Litepicker({ element: document.getElementById("litePicker"), singleMode: false, })

then I use getStartDate() and getEndDate() to get Date object of start and end Dates:

let startDate = picker.getStartDate(); let endDate = picker.getEndDate();

if my code then use startDate.getHours(), there is an error "startDate.getHours is not a function". Same situation happen in others few Date's methods.

joshhsiao333 avatar Nov 10 '21 08:11 joshhsiao333

do let startDate = picker.getStartDate().toJSDate(); and then use standard Date() functions.

MariusWBS avatar Dec 07 '21 16:12 MariusWBS