-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat[DSTSUP-72]: Ensure datepicker shows only date by default (#3898)
* adjust headlines * add demo * save * save * udpate datepicker doku * Create sweet-rice-relax.md
- Loading branch information
Showing
6 changed files
with
71 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@marigold/docs": patch | ||
"@marigold/components": patch | ||
--- | ||
|
||
feat: Ensure datepicker shows only date by default |
7 changes: 1 addition & 6 deletions
7
docs/content/components/form/datepicker/date-picker-basic.demo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
import { DatePicker } from '@marigold/components'; | ||
|
||
export default () => ( | ||
<DatePicker | ||
label="Birth Picker" | ||
description="Determine min and max value for date picker" | ||
/> | ||
); | ||
export default () => <DatePicker label="Date" />; |
11 changes: 11 additions & 0 deletions
11
docs/content/components/form/datepicker/date-picker-controlled.demo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { parseDate } from '@internationalized/date'; | ||
import type { DateValue } from '@internationalized/date'; | ||
import { useState } from 'react'; | ||
|
||
import { DatePicker } from '@marigold/components'; | ||
|
||
export default () => { | ||
const [value, setValue] = useState<DateValue>(parseDate('1912-06-23')); | ||
|
||
return <DatePicker label="Date" value={value} onChange={setValue} />; | ||
}; |
12 changes: 12 additions & 0 deletions
12
docs/content/components/form/datepicker/date-picker-with-date.demo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { parseAbsoluteToLocal } from '@internationalized/date'; | ||
import type { DateValue } from '@internationalized/date'; | ||
import { useState } from 'react'; | ||
|
||
import { DatePicker } from '@marigold/components'; | ||
|
||
export default () => { | ||
const date = new Date().toISOString(); | ||
const [value, setValue] = useState<DateValue>(parseAbsoluteToLocal(date)); | ||
|
||
return <DatePicker label="Date" value={value} onChange={setValue} />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters