Disable any specific day of the week (Fri/Sat/Sun) in DateTimePicker control

4 posts, 0 answers
  1. Sanjay
    Sanjay avatar
    12 posts
    Member since:
    Apr 2020

    Posted 23 Apr 2020 Link to this post

    Hi Team,

    We are looking for some option in DateTimePicker control, which can disable any specific day of the week (eg Fri/Sat/Sun) in  DateTimePicker control.

     

    Regards,

    Sanjay

  2. Stefan
    Admin
    Stefan avatar
    3034 posts

    Posted 23 Apr 2020 Link to this post

    Hello, Sanjay,

    This is currently in our ToDo list.

    I have made a public item for it in GitHub which can be followed for the status:

    https://github.com/telerik/kendo-react/issues/559

    Regards,
    Stefan
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
  3. Sanjay
    Sanjay avatar
    12 posts
    Member since:
    Apr 2020

    Posted 24 Apr 2020 in reply to Stefan Link to this post

    Hi Stefan,

    As per the github item, the task is for customizing the datetimepicker. Do this change support all the default properties of datetime picker like min date and max date, etc.

    Also, if there is one property in datetimepicker like RestrictedDays=[0, 6] (Sturday and Sunday) which will restrict the specific days without customizing the whole datetime picker.

    Regards,

    Sanjay

     

     

  4. Stefan
    Admin
    Stefan avatar
    3034 posts

    Posted 24 Apr 2020 Link to this post

    Hello, Sanjay,

    We try to follow this content for customization based on the React idea for reusable components.

    We provide customization options that accept components like in this case.

    I will share an example to illustrate why we have this approach.

    We provide a custom Calednar option that shows Saturday and Sunday as disabled in a reusable component and used it in multiple places. Then when we have new requirements that a specific day has to be made disabled. If we have property RestrictedDays, we have to go and make the change in all places where if we use custom reusable Calendar, we made the change only on that component, and all pickers that use it will have the new functionality.

    The same example can be seen in the Calendar:

    https://www.telerik.com/kendo-react-ui/components/dateinputs/calendar/custom-rendering/#toc-overriding-the-default-properties

    Regards,
    Stefan
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top