Skip to content

Commit

Permalink
added docs for onClickOnDayNames, fixes English docs page, updated …
Browse files Browse the repository at this point in the history
…libs, closes t1m0n#490, t1m0n#483
  • Loading branch information
t1m0n committed May 18, 2022
1 parent a29d8eb commit 510122f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changelog

### v3.2.0
* added `onClickDayName` param to `clear` method, [#459](https://github.com/t1m0n/air-datepicker/issues/459)
* added `onClickDayName` option, [#459](https://github.com/t1m0n/air-datepicker/issues/459)
* added `silent` param to `clear` method, [#477](https://github.com/t1m0n/air-datepicker/issues/477)
* fixed error when trying to call `update` method with `view` parameter on hidden calendar, [#476](https://github.com/t1m0n/air-datepicker/issues/476)
* fixed styles issue with time sliders, [#489](https://github.com/t1m0n/air-datepicker/issues/489)
Expand Down
5 changes: 4 additions & 1 deletion docs/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default {
optsMultipleDates: 'If {trueField}, then you can select an unlimited number of dates. If you pass a number, the number of selected dates will be limited by it\'s value.',
optsMultipleDatesSeparator: 'Separator between dates in text field. It is used in the multiple date selection mode and in the range mode.',
optsRange: 'Provides the ability to select a date range. The value from {fieldName} will be used as the separator.',
optsDynamicRange: 'Если {trueField}, то после выбора дат в режиме диапазона, их можно будет изменить путем перетаскивания курсором мыши.',
optsDynamicRange: 'If {trueField}, then after selecting dates in range mode, they can be changed by dragging them.',
optsButtons: 'This option allows you to add action buttons to body of the calendar. You could add two pre installed buttons or create your own.',
optsButtons2: 'Initially two buttons are available:',
optsButtonsToday: '"Today" button - clicking on it will perform transition to today date',
Expand Down Expand Up @@ -207,6 +207,9 @@ export default {
eventsOnShowArg: 'animation completion indicator',
eventsOnHide: 'Callback function when closing the calendar. Called at the beginning of the hide animation, and when the animation has finished.',
eventsOnHideArg: 'animation completion indicator',
eventsOnClickDayName: 'Adds possibility to click on the names of days in calendar. In case callback is passed {className} will be added to those elements',
eventsOnClickDayNameDayIndex: 'day of week index, where is 0 - Sunday, 6 - Saturday',
eventsOnClickDayNameDatepicker: 'calendar instance',

apiMethodsTitle: 'Methods',
apiPropertiesTitle: 'Properties',
Expand Down
3 changes: 3 additions & 0 deletions docs/locales/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ export default {
eventsOnShowArg: 'индикатор завершения анимации появления',
eventsOnHide: 'Функция обратного вызова при скрытии календаря. Вызывается вначале анимации скрытия, и когда анимация завершилась.',
eventsOnHideArg: 'индикатор завершения анимации скрытия',
eventsOnClickDayName: 'Добавляет возможность кликать по названиям дней в календаре. При этом, этим элементах будет добавлен класс {className}',
eventsOnClickDayNameDayIndex: 'индекс дня недели, где 0 - воскресенье, 6 - суббота',
eventsOnClickDayNameDatepicker: 'экземпляр календаря',

apiMethodsTitle: 'Методы',
apiPropertiesTitle: 'Свойства',
Expand Down
8 changes: 4 additions & 4 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"date-fns": "^2.23.0",
"fuzzysearch": "^1.0.3",
"github-buttons": "^2.18.1",
"next": "11.1.3",
"next": "12.1.6",
"prismjs": "^1.23.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand All @@ -29,11 +29,11 @@
"eslint": "^7.27.0",
"eslint-plugin-react": "^7.23.2",
"hygen": "^6.1.0",
"node-sass": "^5.0.0",
"node-sass": "^7.0.0",
"prop-types": "^15.7.2",
"raw-loader": "^4.0.2",
"sass-loader": "^12.1.0",
"style-loader": "^3.3.0"
"sass-loader": "^12.6.0",
"style-loader": "^3.3.1"
},
"browserslist": [
"last 2 versions",
Expand Down
11 changes: 10 additions & 1 deletion docs/pages/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,12 +451,21 @@ function Docs({} = {}) {
<Param name={'isFinished'} type={'boolean'} definition={'eventsOnShowArg'} />
</Param.List>
</Param>
<Param name={'onHide'}>
<Param name={'onHide'} type={'(isFinished) => void'}>
<Paragraph id={'eventsOnHide'} type={'(isFinished) => void'}/>
<Param.List nested>
<Param name={'isFinished'} type={'boolean'} definition={'eventsOnHideArg'} />
</Param.List>
</Param>
<Param name={'onClickDayName'} type='({dayIndex, datepicker}) => void'>
<Paragraph id={'eventsOnClickDayName'} values={{
className: <Code inline>`-clickable-`</Code>
}} />
<Param.List nested>
<Param name={'dayIndex'} type={'index'} definition={'eventsOnClickDayNameDayIndex'} />
<Param name={'datepicker'} type={'object'} definition={'eventsOnClickDayNameDatepicker'} />
</Param.List>
</Param>
</Param.List>
</Section>
</main>
Expand Down

0 comments on commit 510122f

Please sign in to comment.