RadDatePicker Only allow Mondays to be selected on a fortnightly basis

2 posts, 0 answers
  1. John
    John avatar
    1 posts
    Member since:
    Sep 2016

    Posted 20 Jan Link to this post

    Hi,

    I'm trying to only allow users to only choose every second monday on the raddatepicker

    Right now I have 

     

    <SpecialDays>
        <telerik:RadCalendarDay Date="01/03/2017" Repeatable="Week" IsSelectable="false" IsDisabled="true"></telerik:RadCalendarDay>
        <telerik:RadCalendarDay Date="01/03/2017" Repeatable="Week" IsSelectable="false" IsDisabled="true"></telerik:RadCalendarDay>
        <telerik:RadCalendarDay Date="01/04/2017" Repeatable="Week" IsSelectable="false" IsDisabled="true"></telerik:RadCalendarDay>
        <telerik:RadCalendarDay Date="01/05/2017" Repeatable="Week" IsSelectable="false" IsDisabled="true"></telerik:RadCalendarDay>
        <telerik:RadCalendarDay Date="01/06/2017" Repeatable="Week" IsSelectable="false" IsDisabled="true"></telerik:RadCalendarDay>
        <telerik:RadCalendarDay Date="01/07/2017" Repeatable="Week" IsSelectable="false" IsDisabled="true"></telerik:RadCalendarDay>
        <telerik:RadCalendarDay Date="01/08/2017" Repeatable="Week" IsSelectable="false" IsDisabled="true"></telerik:RadCalendarDay>
    </SpecialDays>

     

    Which allows me to disable all days expect Monday. But then how do I only allow only every second monday to be clickable

    And or is there another way which is better that can be done via server side coding?

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1786 posts

    Posted 25 Jan Link to this post

    Hello John,

    For disabling specific days in the RadDatePicker control you can use the approach illustrated in the code-library linked below. Note that you would need to handle both the client- and server-side DayRender events.



    Regards,
    Viktor Tachev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top