These docs are for v0.1.0. Click to read the latest docs for v1.0.0.

Front.promptDate(options, callback)

Display a dialog to select a date. It will pass the callback a Javascript Date (or false if the user canceled).

options: object

Field Name

Type

Description

position

object (Integer, Integer)

Position of the prompt in number of pixels from the left and top sides of the page.

val (optional)

Date

Default date when the prompt is opened.

before (optional)

Date

The latest date the user is allowed to select.

after (optional)

Date

The earliest date the user is allowed to select.

callback: function

A callback function.

var position = {
    left: event.screenX - window.screenX,
    top: event.screenY - window.screenY,
};

Front.promptDate({
    position: position,
    val: defaultDate,
    before: forceSelectionBefore,
    after: forceSelectionAfter
}, function (date) {
    console.log('User selected:', date);
}));