Change style.color on DateInput

3 posts, 0 answers
  1. Martin
    Martin avatar
    84 posts
    Member since:
    Apr 2009

    Posted 16 Nov 2009 Link to this post

    I'm using RadDatePicker  and I have client event

    <

     

    ClientEvents OnDateSelected="DateSelected" />

     

    <

     

    DateInput ... />
    inside that handler I would like to change the color of DateInput text to red, indicating change was made
    but I cannot. I've tried several ways and nothing works. Please help

    function

     

    DateSelected(sender, eventArgs) {
        //change color of the DateInput

     

    }

  2. Dimo
    Admin
    Dimo avatar
    8451 posts

    Posted 18 Nov 2009 Link to this post

    Hello Martin,

    You have to use the approach described at the bottom of this help topic:

    http://www.telerik.com/help/aspnet-ajax/input_clientsidebasics.html

    You can reference the DateInput control in the clientside DateSelected handler with sender.get_dateInput().

    These are the styles that you may want to use:

    EnabledStyle
    HoveredStyle
    FocusedStyle

    SomeStyle[0] is for the inline textbox styles, while SomeStyle[1] is for the textbox CSS classes for the respective state.
     

    Sincerely yours,
    Dimo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Martin
    Martin avatar
    84 posts
    Member since:
    Apr 2009

    Posted 19 Nov 2009 Link to this post

    thank you, that did the trick.
Back to Top