Skip to content

Auto close option #11

@sllloyd

Description

@sllloyd

Many date pickers have an autoclose feature that hides the picker once you have chosen a date. I couldn't work out how to do this properly but the following seems to work:

In function DTS defaultConfig add:
autoClose: false

In DTBox.prototype.onDateSelected add this at the end:
if (this.settings.config.autoClose){
var blur = new Event('blur');
this.elem.dispatchEvent(blur);
}

There is probably a better way. Cheers

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