DateTimePicker: Make available just a few days

2 posts, 0 answers
  1. Marc
    Marc avatar
    63 posts
    Member since:
    Mar 2017

    Posted 02 Oct 2018 Link to this post


    I want to make available just the 1st and the 15th of a month.

    How can I get this?



  2. Dimitar
    Dimitar avatar
    2949 posts

    Posted 02 Oct 2018 Link to this post

    Hi Marc,

    You can use the ElementRender event to disable the dates. Here is an example:
    public RadForm1()
        radDateTimePicker1.DateTimePickerElement.Calendar.ElementRender += Calendar_ElementRender;
    private void Calendar_ElementRender(object sender, Telerik.WinControls.UI.RenderElementEventArgs e)
        if (e.Day.Date.Day != 1 && e.Day.Date.Day != 15)
            e.Element.Enabled = false;
            e.Element.Enabled = true;

    I hope this will be useful. Let me know if you have additional questions.

    Progress Telerik
    Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top