@availity/mui-datepicker 0.4.59 → 0.5.1
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.
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/lib/Datepicker.tsx +7 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.5.1](https://github.com/Availity/element/compare/@availity/mui-datepicker@0.5.0...@availity/mui-datepicker@0.5.1) (2025-01-24)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `theme-provider` updated to version `0.5.0`
|
|
10
|
+
## [0.5.0](https://github.com/Availity/element/compare/@availity/mui-datepicker@0.4.59...@availity/mui-datepicker@0.5.0) (2025-01-23)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **mui-controlled-form:** add ControlledDatepicker ([db89204](https://github.com/Availity/element/commit/db89204ac8c92bebcf1dae3f65be84718d87474a))
|
|
16
|
+
|
|
5
17
|
## [0.4.59](https://github.com/Availity/element/compare/@availity/mui-datepicker@0.4.58...@availity/mui-datepicker@0.4.59) (2025-01-22)
|
|
6
18
|
|
|
7
19
|
### Dependency Updates
|
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { DatePickerProps } from '@mui/x-date-pickers/DatePicker';
|
|
|
3
3
|
import { Dayjs } from 'dayjs';
|
|
4
4
|
|
|
5
5
|
type DatepickerProps = {
|
|
6
|
-
value
|
|
6
|
+
value?: Dayjs | null | undefined;
|
|
7
7
|
/** Props applied to the `TextField` component */
|
|
8
8
|
FieldProps?: TextFieldProps;
|
|
9
9
|
/** Determines where the Calendar will be placed when opened.
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { DatePickerProps } from '@mui/x-date-pickers/DatePicker';
|
|
|
3
3
|
import { Dayjs } from 'dayjs';
|
|
4
4
|
|
|
5
5
|
type DatepickerProps = {
|
|
6
|
-
value
|
|
6
|
+
value?: Dayjs | null | undefined;
|
|
7
7
|
/** Props applied to the `TextField` component */
|
|
8
8
|
FieldProps?: TextFieldProps;
|
|
9
9
|
/** Determines where the Calendar will be placed when opened.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/mui-datepicker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Availity MUI Datepicker Component - part of the @availity/element design system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@availity/mui-icon": "0.13.0",
|
|
36
36
|
"@availity/mui-textfield": "0.6.18",
|
|
37
37
|
"@mui/x-date-pickers": "^7.2.0",
|
|
38
|
-
"dayjs": "^1.11.
|
|
38
|
+
"dayjs": "^1.11.13"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@mui/material": "^5.15.15",
|
package/src/lib/Datepicker.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import type { Dayjs } from 'dayjs';
|
|
|
5
5
|
import type {} from '@mui/x-date-pickers/AdapterDayjs';
|
|
6
6
|
|
|
7
7
|
export type DatepickerProps = {
|
|
8
|
-
value
|
|
8
|
+
value?: Dayjs | null | undefined;
|
|
9
9
|
/** Props applied to the `TextField` component */
|
|
10
10
|
FieldProps?: TextFieldProps;
|
|
11
11
|
/** Determines where the Calendar will be placed when opened.
|
|
@@ -43,21 +43,21 @@ export const Datepicker = ({ FieldProps, placement = 'bottom-start', ...props }:
|
|
|
43
43
|
return (
|
|
44
44
|
<MuiDatePicker
|
|
45
45
|
{...props}
|
|
46
|
-
dayOfWeekFormatter
|
|
46
|
+
dayOfWeekFormatter={(weekday: Dayjs) => weekday.format('dd')}
|
|
47
47
|
slotProps={{
|
|
48
48
|
desktopPaper: paperProps,
|
|
49
49
|
mobilePaper: {
|
|
50
50
|
...paperProps,
|
|
51
|
-
'aria-label': FieldProps?.label?.toString() || FieldProps?.inputProps?.['aria-label'] ||
|
|
52
|
-
'aria-labelledby': FieldProps?.inputProps?.['aria-labelledby'] || undefined
|
|
51
|
+
'aria-label': FieldProps?.label?.toString() || FieldProps?.inputProps?.['aria-label'] || 'Date picker',
|
|
52
|
+
'aria-labelledby': FieldProps?.inputProps?.['aria-labelledby'] || undefined,
|
|
53
53
|
},
|
|
54
54
|
popper: {
|
|
55
55
|
placement,
|
|
56
|
-
'aria-label': FieldProps?.label?.toString() || FieldProps?.inputProps?.['aria-label'] ||
|
|
57
|
-
'aria-labelledby': FieldProps?.inputProps?.['aria-labelledby'] || undefined
|
|
56
|
+
'aria-label': FieldProps?.label?.toString() || FieldProps?.inputProps?.['aria-label'] || 'Date picker',
|
|
57
|
+
'aria-labelledby': FieldProps?.inputProps?.['aria-labelledby'] || undefined,
|
|
58
58
|
},
|
|
59
59
|
openPickerIcon: {
|
|
60
|
-
fontSize: 'xsmall'
|
|
60
|
+
fontSize: 'xsmall',
|
|
61
61
|
},
|
|
62
62
|
textField: FieldProps,
|
|
63
63
|
}}
|
|
@@ -65,7 +65,6 @@ export const Datepicker = ({ FieldProps, placement = 'bottom-start', ...props }:
|
|
|
65
65
|
openPickerIcon: CalendarDaysIcon,
|
|
66
66
|
textField: TextField,
|
|
67
67
|
}}
|
|
68
|
-
|
|
69
68
|
/>
|
|
70
69
|
);
|
|
71
70
|
};
|