diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c88ed707..1fd1af09a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,11 @@ ### Dependency updates -## [18.2.3] - 2022-12-16 +## [18.3.0] - 2022-12-19 + +### Added + +- `DatePicker`: Allow changing the initialMonth if no date is selected ([@lorgan3](https://github.com/lorgan3)) in ([#2498](https://github.com/teamleadercrm/ui/pull/2498)) ### Fixed diff --git a/src/components/datepicker/DatePicker.tsx b/src/components/datepicker/DatePicker.tsx index 019533eb6..000f1de01 100644 --- a/src/components/datepicker/DatePicker.tsx +++ b/src/components/datepicker/DatePicker.tsx @@ -26,8 +26,12 @@ export interface DatePickerProps extends Omit; + /** Show a dropdown for the month? */ withMonthPicker?: boolean; + /** Show week numbers? */ showWeekNumbers?: boolean; + /** The initial month to display if no date is selected. */ + initialMonth?: Date; } const DatePicker: GenericComponent = ({ @@ -37,6 +41,7 @@ const DatePicker: GenericComponent = ({ size = 'medium', withMonthPicker, showWeekNumbers, + initialMonth, onChange, ...others }) => { @@ -89,7 +94,7 @@ const DatePicker: GenericComponent = ({