Methods guide of datedropper JS

Version:

On this page:

    Try the new datedropper JS configurator to easily get the best plugin configuration!
    Configure now

    Datedropper provides several methods to further customize and control the behavior of your date picker:


    show

    The show method opens the date picker for the specified selector where it has been initialized. This allows you to define custom triggers to control when the date picker should open.

    Example

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

    hide

    The hide method closes the date picker if it is open for the specified selector. Use this method to customize the behavior of the date picker by hiding it in response to specific events or conditions.

    Example

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

    destroy

    The destroy method closes the date picker and resets datedropper for the specified selector. After calling this method, the element will return to its original state, effectively removing any date picker functionality applied.

    Example

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

    set

    The set method updates or adds options for the date picker on a selector where datedropper has already been initialized. This is useful for dynamically changing settings at runtime.

    Example

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