Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blueprintjs/datetime

Package Overview
Dependencies
Maintainers
1
Versions
255
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blueprintjs/datetime - npm Package Compare versions

Comparing version 1.12.0 to 1.13.0

4

dist/common/errors.d.ts

@@ -9,2 +9,4 @@ export declare const DATEPICKER_DEFAULT_VALUE_INVALID: string;

export declare const DATERANGEPICKER_VALUE_INVALID: string;
export declare const DATERANGEPICKER_PREFERRED_BOUNDARY_TO_MODIFY_INVALID = "<DateRangePicker> preferredBoundaryToModify must be a valid DateRangeBoundary if defined";
export declare const DATERANGEPICKER_PREFERRED_BOUNDARY_TO_MODIFY_INVALID = "<DateRangePicker> preferredBoundaryToModify must be a valid DateRangeBoundary if defined.";
export declare const DATEINPUT_WARN_DEPRECATED_POPOVER_POSITION: string;
export declare const DATEINPUT_WARN_DEPRECATED_OPEN_ON_FOCUS: string;

@@ -10,6 +10,6 @@ /*

var ns = "[Blueprint]";
exports.DATEPICKER_DEFAULT_VALUE_INVALID = ns + " <DatePicker> defaultValue must be within minDate and maxDate bounds";
exports.DATEPICKER_INITIAL_MONTH_INVALID = ns + " <DatePicker> initialMonth must be within minDate and maxDate bounds";
exports.DATEPICKER_MAX_DATE_INVALID = ns + " <DatePicker> maxDate must be later than minDate";
exports.DATEPICKER_VALUE_INVALID = ns + " <DatePicker> value prop must be within minDate and maxDate bounds";
exports.DATEPICKER_DEFAULT_VALUE_INVALID = ns + " <DatePicker> defaultValue must be within minDate and maxDate bounds.";
exports.DATEPICKER_INITIAL_MONTH_INVALID = ns + " <DatePicker> initialMonth must be within minDate and maxDate bounds.";
exports.DATEPICKER_MAX_DATE_INVALID = ns + " <DatePicker> maxDate must be later than minDate.";
exports.DATEPICKER_VALUE_INVALID = ns + " <DatePicker> value prop must be within minDate and maxDate bounds.";
exports.DATERANGEPICKER_DEFAULT_VALUE_INVALID = exports.DATEPICKER_DEFAULT_VALUE_INVALID.replace("DatePicker", "DateRangePicker");

@@ -19,4 +19,6 @@ exports.DATERANGEPICKER_INITIAL_MONTH_INVALID = exports.DATEPICKER_INITIAL_MONTH_INVALID.replace("DatePicker", "DateRangePicker");

exports.DATERANGEPICKER_VALUE_INVALID = exports.DATEPICKER_VALUE_INVALID.replace("DatePicker", "DateRangePicker");
exports.DATERANGEPICKER_PREFERRED_BOUNDARY_TO_MODIFY_INVALID = "<DateRangePicker> preferredBoundaryToModify must be a valid DateRangeBoundary if defined";
exports.DATERANGEPICKER_PREFERRED_BOUNDARY_TO_MODIFY_INVALID = "<DateRangePicker> preferredBoundaryToModify must be a valid DateRangeBoundary if defined.";
exports.DATEINPUT_WARN_DEPRECATED_POPOVER_POSITION = ns + " DEPRECATION: <DateInput> popoverProps is deprecated. Use popoverProps.position.";
exports.DATEINPUT_WARN_DEPRECATED_OPEN_ON_FOCUS = ns + " DEPRECATION: <DateInput> openOnFocus is deprecated. This feature will be removed in the next major version.";
//# sourceMappingURL=errors.js.map
/// <reference types="react" />
import * as moment from "moment";
import { AbstractComponent, IProps, Position } from "@blueprintjs/core";
import { AbstractComponent, IPopoverProps, IProps, Position } from "@blueprintjs/core";
import { IDatePickerBaseProps } from "./datePickerCore";

@@ -49,4 +49,4 @@ import { TimePickerPrecision } from "./timePicker";

/**
* If `true`, the popover will open when the user clicks on the input. If `false`, the popover will only
* open when the calendar icon is clicked.
* If `true`, the popover will open when the user clicks on the input.
* @deprecated since 1.13.0.
* @default true

@@ -63,5 +63,11 @@ */

* @default Position.BOTTOM
* @deprecated since v1.15.0, use `popoverProps.position`
*/
popoverPosition?: Position;
/**
* Props to pass to the `Popover`.
* Note that `content`, `autoFocus`, and `enforceFocus` cannot be changed.
*/
popoverProps?: Partial<IPopoverProps> & object;
/**
* Element to render on right side of input.

@@ -90,3 +96,3 @@ */

static defaultProps: IDateInputProps;
displayName: string;
static displayName: string;
private inputRef;

@@ -96,2 +102,3 @@ constructor(props?: IDateInputProps, context?: any);

componentWillReceiveProps(nextProps: IDateInputProps): void;
validateProps(props: IDateInputProps): void;
private getDateString;

@@ -98,0 +105,0 @@ private isMomentValidAndInRange(value);

@@ -15,2 +15,3 @@ /*

var dateUtils_1 = require("./common/dateUtils");
var errors_1 = require("./common/errors");
var datePicker_1 = require("./datePicker");

@@ -23,3 +24,2 @@ var datePickerCore_1 = require("./datePickerCore");

var _this = _super.call(this, props, context) || this;
_this.displayName = "Blueprint.DateInput";
_this.inputRef = null;

@@ -40,3 +40,5 @@ _this.getDateString = function (value) {

};
_this.handleClosePopover = function () {
_this.handleClosePopover = function (e) {
var _a = _this.props.popoverProps, popoverProps = _a === void 0 ? {} : _a;
core_1.Utils.safeInvoke(popoverProps.onClose, e);
_this.setState({ isOpen: false });

@@ -134,20 +136,31 @@ };

DateInput.prototype.render = function () {
var dateString = this.state.isInputFocused ? this.state.valueString : this.getDateString(this.state.value);
var date = this.state.isInputFocused ? moment(this.state.valueString, this.props.format) : this.state.value;
var sharedProps = tslib_1.__assign({}, this.props, { onChange: this.handleDateChange, value: this.isMomentValidAndInRange(this.state.value) ? dateUtils_1.fromMomentToDate(this.state.value) : null });
var _a = this.state, value = _a.value, valueString = _a.valueString;
var dateString = this.state.isInputFocused ? valueString : this.getDateString(value);
var date = this.state.isInputFocused ? moment(valueString, this.props.format) : value;
var dateValue = this.isMomentValidAndInRange(value) ? dateUtils_1.fromMomentToDate(value) : null;
var popoverContent = this.props.timePrecision === undefined
? React.createElement(datePicker_1.DatePicker, tslib_1.__assign({}, sharedProps))
: React.createElement(dateTimePicker_1.DateTimePicker, tslib_1.__assign({}, sharedProps, { timePickerProps: { precision: this.props.timePrecision } }));
? React.createElement(datePicker_1.DatePicker, tslib_1.__assign({}, this.props, { onChange: this.handleDateChange, value: dateValue }))
: React.createElement(dateTimePicker_1.DateTimePicker, { onChange: this.handleDateChange, value: dateValue, datePickerProps: this.props, timePickerProps: { precision: this.props.timePrecision } });
// assign default empty object here to prevent mutation
var _b = this.props.popoverProps, popoverProps = _b === void 0 ? {} : _b;
var inputClasses = classNames({
"pt-intent-danger": !(this.isMomentValidAndInRange(date) || dateUtils_1.isMomentNull(date) || dateString === ""),
});
return (React.createElement(core_1.Popover, { autoFocus: false, content: popoverContent, enforceFocus: false, inline: true, isOpen: this.state.isOpen && !this.props.disabled, onClose: this.handleClosePopover, popoverClassName: "pt-dateinput-popover", position: this.props.popoverPosition },
return (React.createElement(core_1.Popover, tslib_1.__assign({ inline: true, isOpen: this.state.isOpen && !this.props.disabled, position: this.props.popoverPosition }, popoverProps, { autoFocus: false, enforceFocus: false, content: popoverContent, onClose: this.handleClosePopover, popoverClassName: classNames("pt-dateinput-popover", popoverProps.popoverClassName) }),
React.createElement(core_1.InputGroup, { className: inputClasses, disabled: this.props.disabled, inputRef: this.setInputRef, type: "text", onBlur: this.handleInputBlur, onChange: this.handleInputChange, onClick: this.handleInputClick, onFocus: this.handleInputFocus, placeholder: this.props.format, rightElement: this.props.rightElement, value: dateString })));
};
DateInput.prototype.componentWillReceiveProps = function (nextProps) {
_super.prototype.componentWillReceiveProps.call(this, nextProps);
if (nextProps.value !== this.props.value) {
this.setState({ value: dateUtils_1.fromDateToMoment(nextProps.value) });
}
_super.prototype.componentWillReceiveProps.call(this, nextProps);
};
DateInput.prototype.validateProps = function (props) {
if (props.popoverPosition !== DateInput.defaultProps.popoverPosition) {
console.warn(errors_1.DATEINPUT_WARN_DEPRECATED_POPOVER_POSITION);
}
if (props.openOnFocus !== DateInput.defaultProps.openOnFocus) {
console.warn(errors_1.DATEINPUT_WARN_DEPRECATED_OPEN_ON_FOCUS);
}
};
DateInput.prototype.isMomentValidAndInRange = function (value) {

@@ -172,4 +185,5 @@ return dateUtils_1.isMomentValidAndInRange(value, this.props.minDate, this.props.maxDate);

};
DateInput.displayName = "Blueprint.DateInput";
exports.DateInput = DateInput;
//# sourceMappingURL=dateInput.js.map

@@ -42,3 +42,3 @@ /// <reference types="react" />

static defaultProps: IDatePickerProps;
displayName: string;
static displayName: string;
private ignoreNextMonthChange;

@@ -45,0 +45,0 @@ constructor(props?: IDatePickerProps, context?: any);

@@ -23,3 +23,2 @@ /*

var _this = _super.call(this, props, context) || this;
_this.displayName = "Blueprint.DatePicker";
_this.ignoreNextMonthChange = false;

@@ -230,2 +229,3 @@ _this.disabledDays = function (day) { return !DateUtils.isDayInRange(day, [_this.props.minDate, _this.props.maxDate]); };

};
DatePicker.displayName = "Blueprint.DatePicker";
exports.DatePicker = DatePicker;

@@ -232,0 +232,0 @@ exports.DatePickerFactory = React.createFactory(DatePicker);

/// <reference types="react" />
import * as moment from "moment";
import { AbstractComponent, IInputGroupProps, IPopoverProps, IProps } from "@blueprintjs/core";
import { AbstractComponent, HTMLInputProps, IInputGroupProps, IPopoverProps, IProps } from "@blueprintjs/core";
import { DateRange, DateRangeBoundary } from "./common/dateUtils";

@@ -38,4 +38,5 @@ import { IDatePickerBaseProps } from "./datePickerCore";

* Props to pass to the end-date input.
* `disabled` and `value` will be ignored in favor of the top-level props on this component.
*/
endInputProps?: IInputGroupProps;
endInputProps?: HTMLInputProps & IInputGroupProps;
/**

@@ -98,4 +99,5 @@ * The format of each date in the date range. See options

* Props to pass to the start-date input.
* `disabled` and `value` will be ignored in favor of the top-level props on this component.
*/
startInputProps?: IInputGroupProps;
startInputProps?: HTMLInputProps & IInputGroupProps;
/**

@@ -129,3 +131,3 @@ * The currently selected date range.

static defaultProps: IDateRangeInputProps;
displayName: string;
static displayName: string;
private startInputRef;

@@ -138,15 +140,13 @@ private endInputRef;

componentWillReceiveProps(nextProps: IDateRangeInputProps): void;
private renderInputGroup;
private handleDateRangePickerChange;
private handleDateRangePickerHoverChange;
private handleStartInputEvent;
private handleEndInputEvent;
private handleInputEvent;
private handleInputKeyDown;
private handleInputMouseDown;
private handleInputClick;
private handleStartInputFocus;
private handleEndInputFocus;
private handleInputFocus;
private handleStartInputBlur;
private handleEndInputBlur;
private handleInputBlur;
private handleStartInputChange;
private handleEndInputChange;
private handleInputChange;

@@ -158,5 +158,7 @@ private handlePopoverClose;

private getSelectedRange;
private getInputClasses;
private getInputGroupCallbackForEvent;
private getInputDisplayString;
private getInputPlaceholderString;
private getInputProps;
private getInputRef;
private getFormattedDateString;

@@ -163,0 +165,0 @@ private getStateKeysAndValuesForBoundary;

@@ -23,3 +23,2 @@ /*

var _this = _super.call(this, props, context) || this;
_this.displayName = "Blueprint.DateRangeInput";
_this.refHandlers = {

@@ -35,2 +34,16 @@ endInputRef: function (ref) {

};
_this.renderInputGroup = function (boundary) {
var inputProps = _this.getInputProps(boundary);
// don't include `ref` in the returned HTML props, because passing it to the InputGroup
// leads to TS typing errors.
var ref = inputProps.ref, htmlProps = tslib_1.__rest(inputProps, ["ref"]);
var handleInputEvent = (boundary === dateUtils_1.DateRangeBoundary.START)
? _this.handleStartInputEvent
: _this.handleEndInputEvent;
var classes = classNames((_a = {},
_a[core_1.Classes.INTENT_DANGER] = _this.isInputInErrorState(boundary),
_a), inputProps.className);
return (React.createElement(core_1.InputGroup, tslib_1.__assign({}, htmlProps, { className: classes, disabled: _this.props.disabled, inputRef: _this.getInputRef(boundary), onBlur: handleInputEvent, onChange: handleInputEvent, onClick: handleInputEvent, onFocus: handleInputEvent, onKeyDown: handleInputEvent, onMouseDown: handleInputEvent, placeholder: _this.getInputPlaceholderString(boundary), value: _this.getInputDisplayString(boundary) })));
var _a;
};
// Callbacks - DateRangePicker

@@ -130,3 +143,35 @@ // ===========================

// =================
// Key down
// instantiate these two functions once so we don't have to for each callback on each render.
_this.handleStartInputEvent = function (e) {
_this.handleInputEvent(e, dateUtils_1.DateRangeBoundary.START);
};
_this.handleEndInputEvent = function (e) {
_this.handleInputEvent(e, dateUtils_1.DateRangeBoundary.END);
};
_this.handleInputEvent = function (e, boundary) {
switch (e.type) {
case "blur":
_this.handleInputBlur(e, boundary);
break;
case "change":
_this.handleInputChange(e, boundary);
break;
case "click":
_this.handleInputClick(e);
break;
case "focus":
_this.handleInputFocus(e, boundary);
break;
case "keydown":
_this.handleInputKeyDown(e);
break;
case "mousedown":
_this.handleInputMouseDown();
break;
default: break;
}
var inputProps = _this.getInputProps(boundary);
var callbackFn = _this.getInputGroupCallbackForEvent(e, inputProps);
core_1.Utils.safeInvoke(callbackFn, e);
};
// add a keydown listener to persistently change focus when tabbing:

@@ -168,3 +213,2 @@ // - if focused in start field, Tab moves focus to end field

};
// Mouse down
_this.handleInputMouseDown = function () {

@@ -176,3 +220,2 @@ // clicking in the field constitutes an explicit focus change. we update

};
// Click
_this.handleInputClick = function (e) {

@@ -183,9 +226,2 @@ // unless we stop propagation on this event, a click within an input

};
// Focus
_this.handleStartInputFocus = function (e) {
_this.handleInputFocus(e, dateUtils_1.DateRangeBoundary.START);
};
_this.handleEndInputFocus = function (e) {
_this.handleInputFocus(e, dateUtils_1.DateRangeBoundary.END);
};
_this.handleInputFocus = function (_e, boundary) {

@@ -211,9 +247,2 @@ var _a = _this.getStateKeysAndValuesForBoundary(boundary), keys = _a.keys, values = _a.values;

};
// Blur
_this.handleStartInputBlur = function (e) {
_this.handleInputBlur(e, dateUtils_1.DateRangeBoundary.START);
};
_this.handleEndInputBlur = function (e) {
_this.handleInputBlur(e, dateUtils_1.DateRangeBoundary.END);
};
_this.handleInputBlur = function (_e, boundary) {

@@ -244,11 +273,2 @@ var _a = _this.getStateKeysAndValuesForBoundary(boundary), keys = _a.keys, values = _a.values;

};
// Change
_this.handleStartInputChange = function (e) {
_this.handleInputChange(e, dateUtils_1.DateRangeBoundary.START);
core_1.Utils.safeInvoke(_this.props.startInputProps.onChange, e);
};
_this.handleEndInputChange = function (e) {
_this.handleInputChange(e, dateUtils_1.DateRangeBoundary.END);
core_1.Utils.safeInvoke(_this.props.endInputProps.onChange, e);
};
_this.handleInputChange = function (e, boundary) {

@@ -331,7 +351,13 @@ var inputString = e.target.value;

};
_this.getInputClasses = function (boundary, boundaryInputProps) {
return classNames(boundaryInputProps.className, (_a = {},
_a[core_1.Classes.INTENT_DANGER] = _this.isInputInErrorState(boundary),
_a));
var _a;
_this.getInputGroupCallbackForEvent = function (e, inputProps) {
// use explicit switch cases to ensure callback function names remain grep-able in the codebase.
switch (e.type) {
case "blur": return inputProps.onBlur;
case "change": return inputProps.onChange;
case "click": return inputProps.onClick;
case "focus": return inputProps.onFocus;
case "keydown": return inputProps.onKeyDown;
case "mousedown": return inputProps.onMouseDown;
default: return undefined;
}
};

@@ -362,8 +388,30 @@ _this.getInputDisplayString = function (boundary) {

_this.getInputPlaceholderString = function (boundary) {
var isStartBoundary = boundary === dateUtils_1.DateRangeBoundary.START;
var isEndBoundary = boundary === dateUtils_1.DateRangeBoundary.END;
var inputProps = _this.getInputProps(boundary);
var isInputFocused = _this.getStateKeysAndValuesForBoundary(boundary).values.isInputFocused;
var isStartBoundary = boundary === dateUtils_1.DateRangeBoundary.START;
var dateString = isStartBoundary ? _this.state.formattedMinDateString : _this.state.formattedMaxDateString;
var defaultString = isStartBoundary ? "Start date" : "End date";
return isInputFocused ? dateString : defaultString;
// use the custom placeholder text for the input, if providied
if (inputProps.placeholder != null) {
return inputProps.placeholder;
}
else if (isStartBoundary) {
return isInputFocused ? _this.state.formattedMinDateString : "Start date";
}
else if (isEndBoundary) {
return isInputFocused ? _this.state.formattedMaxDateString : "End date";
}
else {
return "";
}
};
_this.getInputProps = function (boundary) {
return (boundary === dateUtils_1.DateRangeBoundary.START)
? _this.props.startInputProps
: _this.props.endInputProps;
};
_this.getInputRef = function (boundary) {
return (boundary === dateUtils_1.DateRangeBoundary.START)
? _this.refHandlers.startInputRef
: _this.refHandlers.endInputRef;
};
_this.getFormattedDateString = function (momentDate, format) {

@@ -527,4 +575,3 @@ if (dateUtils_1.isMomentNull(momentDate)) {

DateRangeInput.prototype.render = function () {
var _a = this.props, startInputProps = _a.startInputProps, endInputProps = _a.endInputProps;
var popoverContent = (React.createElement(dateRangePicker_1.DateRangePicker, { allowSingleDayRange: this.props.allowSingleDayRange, boundaryToModify: this.state.boundaryToModify, contiguousCalendarMonths: this.props.contiguousCalendarMonths, onChange: this.handleDateRangePickerChange, onHoverChange: this.handleDateRangePickerHoverChange, maxDate: this.props.maxDate, minDate: this.props.minDate, shortcuts: this.props.shortcuts, value: this.getSelectedRange() }));
var popoverContent = (React.createElement(dateRangePicker_1.DateRangePicker, tslib_1.__assign({}, this.props, { boundaryToModify: this.state.boundaryToModify, onChange: this.handleDateRangePickerChange, onHoverChange: this.handleDateRangePickerHoverChange, value: this.getSelectedRange() })));
// allow custom props for the popover and each input group, but pass them in an order that

@@ -534,4 +581,4 @@ // guarantees only some props are overridable.

React.createElement("div", { className: core_1.Classes.CONTROL_GROUP },
React.createElement(core_1.InputGroup, tslib_1.__assign({}, startInputProps, { className: this.getInputClasses(dateUtils_1.DateRangeBoundary.START, startInputProps), disabled: this.props.disabled, inputRef: this.refHandlers.startInputRef, onBlur: this.handleStartInputBlur, onChange: this.handleStartInputChange, onClick: this.handleInputClick, onFocus: this.handleStartInputFocus, onKeyDown: this.handleInputKeyDown, onMouseDown: this.handleInputMouseDown, placeholder: this.getInputPlaceholderString(dateUtils_1.DateRangeBoundary.START), value: this.getInputDisplayString(dateUtils_1.DateRangeBoundary.START) })),
React.createElement(core_1.InputGroup, tslib_1.__assign({}, endInputProps, { className: this.getInputClasses(dateUtils_1.DateRangeBoundary.END, endInputProps), disabled: this.props.disabled, inputRef: this.refHandlers.endInputRef, onBlur: this.handleEndInputBlur, onChange: this.handleEndInputChange, onClick: this.handleInputClick, onFocus: this.handleEndInputFocus, onKeyDown: this.handleInputKeyDown, onMouseDown: this.handleInputMouseDown, placeholder: this.getInputPlaceholderString(dateUtils_1.DateRangeBoundary.END), value: this.getInputDisplayString(dateUtils_1.DateRangeBoundary.END) })))));
this.renderInputGroup(dateUtils_1.DateRangeBoundary.START),
this.renderInputGroup(dateUtils_1.DateRangeBoundary.END))));
};

@@ -595,4 +642,5 @@ DateRangeInput.prototype.componentWillReceiveProps = function (nextProps) {

};
DateRangeInput.displayName = "Blueprint.DateRangeInput";
exports.DateRangeInput = DateRangeInput;
//# sourceMappingURL=dateRangeInput.js.map

@@ -72,3 +72,3 @@ /// <reference types="react" />

static defaultProps: IDateRangePickerProps;
displayName: string;
static displayName: string;
private readonly isControlled;

@@ -75,0 +75,0 @@ private modifiers;

@@ -26,3 +26,2 @@ /*

var _this = _super.call(this, props, context) || this;
_this.displayName = "Blueprint.DateRangePicker";
// these will get merged with the user's own

@@ -316,2 +315,3 @@ _this.modifiers = (_a = {},

};
DateRangePicker.displayName = "Blueprint.DateRangePicker";
exports.DateRangePicker = DateRangePicker;

@@ -318,0 +318,0 @@ function getStateChange(value, nextValue, state, contiguousCalendarMonths) {

@@ -42,3 +42,3 @@ /// <reference types="react" />

static defaultProps: IDateTimePickerProps;
displayName: string;
static displayName: string;
constructor(props?: IDateTimePickerProps, context?: any);

@@ -45,0 +45,0 @@ render(): JSX.Element;

@@ -21,3 +21,2 @@ /*

var _this = _super.call(this, props, context) || this;
_this.displayName = "Blueprint.DateTimePicker";
_this.handleDateChange = function (dateValue, isUserChange) {

@@ -64,4 +63,5 @@ if (_this.props.value === undefined) {

};
DateTimePicker.displayName = "Blueprint.DateTimePicker";
exports.DateTimePicker = DateTimePicker;
//# sourceMappingURL=dateTimePicker.js.map

@@ -49,3 +49,3 @@ /// <reference types="react" />

static defaultProps: ITimePickerProps;
displayName: string;
static displayName: string;
constructor(props?: ITimePickerProps, context?: any);

@@ -52,0 +52,0 @@ render(): JSX.Element;

@@ -26,3 +26,2 @@ /*

var _this = _super.call(this, props, context) || this;
_this.displayName = "Blueprint.TimePicker";
// begin method definitions: event handlers

@@ -209,2 +208,3 @@ _this.getInputBlurHandler = function (unit) { return function (e) {

};
TimePicker.displayName = "Blueprint.TimePicker";
exports.TimePicker = TimePicker;

@@ -211,0 +211,0 @@ var TimeUnit;

{
"name": "@blueprintjs/datetime",
"version": "1.12.0",
"version": "1.13.0",
"description": "Components for interacting with dates and times",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -11,9 +11,9 @@ /*

export const DATEPICKER_DEFAULT_VALUE_INVALID =
`${ns} <DatePicker> defaultValue must be within minDate and maxDate bounds`;
`${ns} <DatePicker> defaultValue must be within minDate and maxDate bounds.`;
export const DATEPICKER_INITIAL_MONTH_INVALID =
`${ns} <DatePicker> initialMonth must be within minDate and maxDate bounds`;
`${ns} <DatePicker> initialMonth must be within minDate and maxDate bounds.`;
export const DATEPICKER_MAX_DATE_INVALID =
`${ns} <DatePicker> maxDate must be later than minDate`;
`${ns} <DatePicker> maxDate must be later than minDate.`;
export const DATEPICKER_VALUE_INVALID =
`${ns} <DatePicker> value prop must be within minDate and maxDate bounds`;
`${ns} <DatePicker> value prop must be within minDate and maxDate bounds.`;

@@ -27,2 +27,7 @@ export const DATERANGEPICKER_DEFAULT_VALUE_INVALID =

export const DATERANGEPICKER_PREFERRED_BOUNDARY_TO_MODIFY_INVALID =
"<DateRangePicker> preferredBoundaryToModify must be a valid DateRangeBoundary if defined";
"<DateRangePicker> preferredBoundaryToModify must be a valid DateRangeBoundary if defined.";
export const DATEINPUT_WARN_DEPRECATED_POPOVER_POSITION =
`${ns} DEPRECATION: <DateInput> popoverProps is deprecated. Use popoverProps.position.`;
export const DATEINPUT_WARN_DEPRECATED_OPEN_ON_FOCUS =
`${ns} DEPRECATION: <DateInput> openOnFocus is deprecated. This feature will be removed in the next major version.`;
@# Date input
The `DateInput` component is an [input group](#core/components/forms/input-group) with a calendar button
that shows a [`DatePicker`](#datetime/datepicker) in a [`Popover`](#core/components/popover).
The `DateInput` component is an [input group](#core/components/forms/input-group) that shows a [`DatePicker`](#datetime/datepicker) in a [`Popover`](#core/components/popover) on focus.

@@ -6,0 +5,0 @@ Use the `onChange` function to listen for changes to the selected date. Use `onError` to listen for

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc