Date Picker

Documentation

Input Parameters

Name Type Description
className string The class name to apply to the main element.
el HTMLElement The element to render the date picker to.
description string The field description.
onChange (value: Date) The change event.
showTime boolean Flag to show the time.
timePickerType number The time picker type.
value Date The datetime value.

IDatePicker Interface

Name Type/Description
getDate() Returns the date picker element.
getTime() Returns the time picker element.
getFabricComponent() Returns the fabric component.
getValue() Returns the datetime value.

Fabric Date Picker Interface

Name Type/Description
picker The datepicker uses the Pick a Date library. }

Picker

Name Type
component { formats: any; item: any; key: any; queue: any; settings: any; }
clear Function
close Function
get Function
off Function
on Function
open Function
set Function
start Function
stop Function

JavaScript

var $REST = require("gd-sprest-js");

// Create the date picker
var el = document.querySelector("#dt");
$REST.JS.Fabric.DatePicker({
    el: el,
    showTime: false
});

TypeScript

import { Fabric } from "gd-sprest-js";

// Create the date picker
let el = document.querySelector("#dt");
Fabric.DatePicker({
    el,
    showTime: false
});