Methods

On this page:

    datedropper comes with the following methods which allow you to further customize your date picker.


    show

    This method opens the date picker on the selector on which it has been initialized. For instance, this allows you to define specific triggers through which the date picker should be opened.

    EXAMPLE

    document.querySelector('.myInput').datedropper('show');

    hide

    If the date picker is open, this method closes it for the selector on which datedropper has been initialized. This is another way to customize the behavior of the date picker by hiding it in response to specific events.

    EXAMPLE

    document.querySelector('.myInput').datedropper('hide');

    destroy

    This method closes the date picker and resets datedropper on the selector on which it has been initialized. Therefore, after using the destroy method, the selector will be reset to the initial state.

    EXAMPLE

    document.querySelector('.myInput').datedropper('destroy');

    set

    This method allows you to edit any datedropper options on a selector on which datedropper has been initialized. Basically, the set method adds and updates already existing options.

    EXAMPLE

    document.querySelector('.myInput').datedropper('set',{ overlay: true });