readonly in datepicker

4 posts, 1 answers
  1. Tina
    Tina avatar
    130 posts
    Member since:
    Jul 2011

    Posted 09 Mar 2012 Link to this post

    How to make the datepicker readonly in edit mode?

    <EditItemTemplate>
              <telerik:RadDatePicker ID="RadDatePicker1" runat="server" ></telerik:RadDatePicker>
           </EditItemTemplate>
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 09 Mar 2012 Link to this post

    Hello,

    Try the following code.
    C#:
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
      if (e.Item is GridEditableItem && e.Item.IsInEditMode)
      {
        GridEditableItem item = (GridEditableItem)e.Item;
        RadDatePicker Datepicker = (RadDatePicker)item.FindControl("RadDatePicker1");
        Datepicker.DateInput.ReadOnly = true;
      }
    }

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tina
    Tina avatar
    130 posts
    Member since:
    Jul 2011

    Posted 12 Mar 2012 Link to this post

    Thanks.
    How can i disable dates in datepicker?
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 12 Mar 2012 Link to this post

    Hello,

    Check the following code library which explains the same.
    Disabling calendar days

    -Shinu.
Back to Top