You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Migrate to TypeScript, build with tsdx and update Storybook (#45)
* refactor: Start rewrite of the library with tsdx
* feat: migrate code to TypeScript
Except for the locales, the code was updated to use TypeScript
* build: use older version of rollup-plugin-copy for now
* refactor: remove unused file and add default value for prop readOnly
* fix(types): picking props from Dayzed and Form.Input that are accepted
* chore(examples): install latest version of Storybook
* docs(readme): remove TypeScript from the roadmap
* chore: fix deploy of Storybook on Now
* chore: add lint script to package.json
* build: lock versions of packages in package.json
* test(utils): bring back tests for utils
* build: fix lint script, Jest config and add validate script
* chore: remove @types packages for react and react-dom from devDependencies
this may cause an error when compiling Storybook since they are also installed by Storybook's types
* fix(datepicker): remove duplicate key on defaultProps
* build(css): output single CSS file with the current name
* ci(travis): run TravisCI on branch develop
* ci(travis): only execute after_success script on branch master
* docs: update typings on README and in the code
* build: add prebuild script to remove dist folder
* refactor: simplify export and fix a few types
| clearable | boolean | no | true | Allows the user to clear the value |
75
-
| format | string | no | 'YYYY-MM-DD' | Specifies how the date will be formatted using the [date-fns' format](https://date-fns.org/v1.29.0/docs/format)|
76
-
| keepOpenOnClear | boolean | no | false | Keeps the datepicker open (or opens it if it's closed) when the clear icon is clicked |
77
-
| keepOpenOnSelect | boolean | no | false | Keeps the datepicker open when a date is selected |
78
-
| locale | object | no |[en-US](https://github.com/arthurdenner/react-semantic-ui-datepickers/blob/master/src/locales/en-US.js)| Object with the labels to be used on the library PS: Feel free to submit PR's with more locales! |
79
-
| onDateChange | function | yes || Callback fired when the value changes |
80
-
| type | string | no | basic | Type of input to render. Available options: 'basic' and 'range' |
81
-
| filterDate | function | no | () => true | Function that receives each date and returns a boolean to indicate whether it is enabled or not |
82
-
| selected | Date, arrayOf(Date) | no || Default date selected |
83
-
| pointing | string | no | 'left' | Location to render the component around input. Available options: 'left', 'right', 'top left', 'top right' |
84
-
| clearOnSameDateClick | boolean | no | true | Controls whether the datepicker's state resets if the same date is selected in succession. |
| allowOnlyNumbers | boolean | no | true | Allows the user enter only numbers |
75
+
| clearOnSameDateClick | boolean | no | true | Controls whether the datepicker's state resets if the same date is selected in succession. |
76
+
| clearable | boolean | no | true | Allows the user to clear the value |
77
+
| filterDate | function | no | () => true | Function that receives each date and returns a boolean to indicate whether it is enabled or not |
78
+
| format | string | no | 'YYYY-MM-DD' | Specifies how the date will be formatted using the [date-fns' format](https://date-fns.org/v1.29.0/docs/format)|
79
+
| keepOpenOnClear | boolean | no | false | Keeps the datepicker open (or opens it if it's closed) when the clear icon is clicked |
80
+
| keepOpenOnSelect | boolean | no | false | Keeps the datepicker open when a date is selected |
81
+
| locale | object | no |[en-US](https://github.com/arthurdenner/react-semantic-ui-datepickers/blob/master/src/locales/en-US.js)| Object with the labels to be used on the library PS: Feel free to submit PR's with more locales! |
82
+
| onBlur | function | no | () => {} | Callback fired when the input loses focus |
83
+
| onDateChange | function | yes || Callback fired when the value changes |
84
+
| pointing | string | no | 'left' | Location to render the component around input. Available options: 'left', 'right', 'top left', 'top right' |
85
+
| type | string | no | basic | Type of input to render. Available options: 'basic' and 'range' |
85
86
86
87
### Form.Input Props
87
88
@@ -118,15 +119,14 @@ In order to customize the elements, you can override the styles of the classes b
118
119
- clndr-cell-selected
119
120
- clndr-cell-other-month
120
121
121
-
> If you think this way of customizing is not a good idea, feel free to open a issue suggesting something else. This was the simplest solution I thought.
122
+
> If you think this way of customizing is not a good idea, feel free to open an issue suggesting something else. This was the simplest solution I thought.
122
123
123
124
## Roadmap
124
125
125
126
- Improve accessibility
126
127
> @donysukardi did some work on accessibility in the BaseDatePicker, but I couldn't get it working correcly. Feel free to help on this!
127
128
- Add more tests (including e2e)
128
129
> The current threshold is pretty useless 😕
129
-
- Add TypeScript definitions (or migrate to TypeScript)
130
130
131
131
> Feel free to open issues and/or create PRs to improve other aspects of the library!
0 commit comments