@skedulo/sked-ui 21.9.3 → 21.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { DateFormats } from '../../utils/config-utils';
|
|
2
3
|
export interface IDateTimeProps {
|
|
3
4
|
dateTime?: Date;
|
|
4
5
|
/**
|
|
@@ -41,6 +42,10 @@ export interface IDateTimeProps {
|
|
|
41
42
|
* The format of the date to display
|
|
42
43
|
*/
|
|
43
44
|
dateFormat?: string;
|
|
45
|
+
/**
|
|
46
|
+
* If provided, the 'dateFormat' prop will be ignored and the format from 'dateFormatPreference' will be used instead.
|
|
47
|
+
*/
|
|
48
|
+
dateFormatPreference?: DateFormats;
|
|
44
49
|
/**
|
|
45
50
|
* increment-only will only allow selection of an interval
|
|
46
51
|
* freeform will allow valid time values that are not included in the intervals
|
|
@@ -52,4 +57,4 @@ export declare const convertTimeStringTo24Hr: (value: string) => {
|
|
|
52
57
|
hours: number;
|
|
53
58
|
minutes: number;
|
|
54
59
|
};
|
|
55
|
-
export declare const DateTime: ({ timeIncrement, onChange, onDateChange, onTimeChange, dateTime, disabled, openToDate, dateFormat, timeValueSelection, timePlaceholder, datePlaceholder, id }: IDateTimeProps) => React.JSX.Element;
|
|
60
|
+
export declare const DateTime: ({ timeIncrement, onChange, onDateChange, onTimeChange, dateTime, disabled, openToDate, dateFormat, dateFormatPreference, timeValueSelection, timePlaceholder, datePlaceholder, id }: IDateTimeProps) => React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactDatePickerProps } from 'react-datepicker';
|
|
3
|
+
import { DateFormats } from '../../utils/config-utils';
|
|
3
4
|
import { RangeType } from '../calendar-controls/elements/RangePicker';
|
|
4
5
|
export type LocaleType = 'AU' | 'US' | 'UK';
|
|
5
6
|
type CustomInputType = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
@@ -50,9 +51,13 @@ export interface DatepickerProps {
|
|
|
50
51
|
*/
|
|
51
52
|
placeholderText?: string;
|
|
52
53
|
/**
|
|
53
|
-
* The format of the date to display
|
|
54
|
+
* The format of the date to display. Custom date-fns format string
|
|
54
55
|
*/
|
|
55
56
|
dateFormat?: string;
|
|
57
|
+
/**
|
|
58
|
+
* If provided, the 'dateFormat' prop will be ignored and the format from 'dateFormatPreference' will be used instead.
|
|
59
|
+
*/
|
|
60
|
+
dateFormatPreference?: DateFormats;
|
|
56
61
|
/**
|
|
57
62
|
* Any additional styling to add to the datepicker
|
|
58
63
|
*/
|