Skip to content

Commit

Permalink
chore: locale
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobdevera committed Dec 10, 2019
1 parent 3160236 commit 808956f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Calendar/__stories__/Calendar.stories.js
Expand Up @@ -5,9 +5,11 @@ import {
boolean,
date,
optionsKnob,
text,
withKnobs
} from '@storybook/addon-knobs';


function dateKnobToDate(name, defaultValue) {
const stringTimestamp = date(name, defaultValue);
return new Date(stringTimestamp);
Expand Down Expand Up @@ -45,7 +47,8 @@ storiesOf('Components|Calendar', module)
disableWeekday={optionsKnob('disable weekdays', weekdayOptions, null, { display: 'check' })}
disableWeekends={boolean('disable weekends', false)}
disabledDates={[dateKnobToDate('disable between dates (1)', disabledDateFirstDefault),
dateKnobToDate('disable between dates (2)', disabledDateSecondDefault)]} />
dateKnobToDate('disable between dates (2)', disabledDateSecondDefault)]}
locale={text('locale', 'en')} />
))
.add('disable styles', () => (
<Calendar disableStyles />
Expand Down
4 changes: 3 additions & 1 deletion src/DatePicker/__stories__/DatePicker.stories.js
Expand Up @@ -5,6 +5,7 @@ import {
boolean,
date,
optionsKnob,
text,
withKnobs
} from '@storybook/addon-knobs';

Expand Down Expand Up @@ -45,7 +46,8 @@ storiesOf('Components|DatePicker', module)
disableWeekday={optionsKnob('disable weekdays', weekdayOptions, null, { display: 'check' })}
disableWeekends={boolean('disable weekends', false)}
disabledDates={[dateKnobToDate('disable between dates (1)', disabledDateFirstDefault),
dateKnobToDate('disable between dates (2)', disabledDateSecondDefault)]} />
dateKnobToDate('disable between dates (2)', disabledDateSecondDefault)]}
locale={text('locale', 'en')} />
))
.add('disable styles', () => (
<DatePicker
Expand Down

0 comments on commit 808956f

Please sign in to comment.