This is a migrated thread and some comments may be shown as answers.

Datepicker [Previous dates, block keydown, disable days ]

1 Answer 478 Views
Wrappers for React
This is a migrated thread and some comments may be shown as answers.
Serhii
Top achievements
Rank 1
Serhii asked on 20 Dec 2018, 10:10 AM

Hi there, I have several quastions. 

1) How I can block manual data change in input and key down events. Leave only one way to change data by mouse click.
2) How I can show previous days in month, instead empty fields we will show days from previous month but their color will be gray.
3) How I can  disable days in currrent month till today?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 24 Dec 2018, 07:34 AM
Hello, Serhii,

Regarding the questions:

1) How I can block manual data change in input and key down events. Leave only one way to change data by mouse click: This can be achieved by preventing the keydown event of the input element:

https://stackblitz.com/edit/react-4vt4vk?file=app/main.js

2) How I can show previous days in a month, instead of empty fields we will show days from the previous month but their color will be gray - We are currently implementing a custom render for the cell that will allow rendering the dates are desired. Once it is available, this could be possible.

3) How I can disable days in current month till today. This can be achieved with the min property of the DatePicker

https://stackblitz.com/edit/react-6bv2rd?file=app/main.js

https://www.telerik.com/kendo-react-ui/components/dateinputs/api/DatePickerProps/#toc-min

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Wrappers for React
Asked by
Serhii
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or