Skip to content

onSet Callback for highlight events contains the previous highlight #948

@eggonabull

Description

@eggonabull
var datePicker = dateInput.pickadate({
    onSet: function(e) {
        if(e && e.highlight) {
            console.log(new Date(e.highlight.pick)); // shows previously highlighted date instead of newly highlighted date
        }
    }
}).pickadate('picker');

Open the date picker, then navigate through the months, notice that as you click the month-change arrows, the highlight event logs the date that was previously highlighted, not the newly highlighted event.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions