UNPKG

779 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var usePickerState_1 = require("./usePickerState");
4function useStaticState(_a) {
5 var value = _a.value, _b = _a.autoOk, autoOk = _b === void 0 ? true : _b, onChange = _a.onChange, defaultFormat = _a.defaultFormat;
6 var _c = usePickerState_1.usePickerState({ value: value, onChange: onChange, autoOk: autoOk }, {
7 // just a random format, mostly always not needed for users
8 getDefaultFormat: function () { return defaultFormat || 'MM/dd/yyyy'; },
9 }), pickerProps = _c.pickerProps, wrapperProps = _c.wrapperProps, inputProps = _c.inputProps;
10 return { pickerProps: pickerProps, wrapperProps: wrapperProps, inputProps: inputProps };
11}
12exports.useStaticState = useStaticState;