Closed afilp closed 5 years ago
Please refer to Keyboard Input example here: https://material-ui-pickers.firebaseapp.com/demo/datepicker Is this what you need? Something like:
<DateInput source="startDate" label="Start date" options={{ keyboard: true }} />
I just added the option but nothing happened, I cannot type inside the field. This is my code:
<DateInput
label="Arrival Date To"
source="startDateTo"
options={{format: 'DD/MM/YYYY', showTodayButton: true, keyboard: true,}}
alwaysOn
/>
Ok I will test tomorrow and let you know.
On Mon, 25 Jun 2018, 01:17 afilp, notifications@github.com wrote:
I just added the option but nothing happened, I cannot type inside the field. This is my code:
<DateInput label="Arrival Date To" source="startDateTo" options={{format: 'DD/MM/YYYY', showTodayButton: true, keyboard: true,}} alwaysOn />
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vascofg/react-admin-date-inputs/issues/3#issuecomment-399800612, or mute the thread https://github.com/notifications/unsubscribe-auth/AAmuSXkaSF0skPcKJ0UKPXEjjyTzgtlyks5uACwFgaJpZM4U1VVL .
Thx!
Not sure if we need to do something with state
, as in their example they use their onChange
handler. If you can show an example (maybe in the README) on how this can work, that would be great!
This is fixed in the latest version, please update to 1.0.13
.
I'm now using material-ui-pickers
default TextFieldComponent which has the logic to handle these different modes.
Seems to be fixed indeed. Thanks!
P.S. It has some weird behavior though, when pressing ENTER. It fetches twice, once when it loses the focus and another time when clicking OK in the modal that just opened.
Not sure, does passing disableOpenOnEnter
on options help with that?
Please check https://github.com/dmtrKovalenko/material-ui-pickers/issues/495 for another possible issue.
@vascofg Thanks! Will you merge their latest master to get the fix here too?
I've bumped the material-ui-pickers dependency version in 1.0.16
, please confirm this is fixed.
In an app where someone has to enter old dates (for example, a birth date at 1976), it is difficult to use just the visual modal form (too many clicks to find the date).
Could you find a way to be able to also type a date?
Please check here a similar implementation: http://react-day-picker.js.org/docs/input
Thx!