Datepicker [Previous dates, block keydown, disable days ]

2 posts, 0 answers
  1. Serhii
    Serhii avatar
    3 posts
    Member since:
    Dec 2018

    Posted 20 Dec 2018 Link to this post

    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?

  2. Stefan
    Admin
    Stefan avatar
    2922 posts

    Posted 24 Dec 2018 Link to this post

    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
Back to Top