Clear date in datepicker

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

    Posted 09 Apr 2012 Link to this post

    How to clear date in datepicker from client side(button click)?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 09 Apr 2012 Link to this post

    Hello Tina,

    Try the following javascript.
    JS:
    function Click()
    {
        var pkr = $find("<%= StartDate.ClientID %>");
        pkr.get_dateInput().clear();
    }

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

    Posted 11 Apr 2012 Link to this post

    How to set border color for dateinput via client side?
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 11 Apr 2012 Link to this post

    Hello,

    Try the following javascript.
    JS:
    function pageLoad()
    {
      var pkr = $find("<%= DatePicker1.ClientID %>");
      pkr.get_dateInput()._styles.EnabledStyle[0] += "border-color: Red;"
      pkr.get_dateInput().updateCssClass();
    }

    Thanks,
    Princy.
Back to Top