Link to home
Start Free TrialLog in
Avatar of Bruce Gust
Bruce GustFlag for United States of America

asked on

How would I get the color of this datepicker field to change onblur?

Head out to http://brucegust.com/portfolio/verizon/javascript_test.php

Click on the date field (start date). You'll get a calendar. You can select a date and the date shows up in the field.

Perfect.

I want the color of the date you just entered to be black. How?

I've learned some things via google. I've found an "onSelect" dynamic, but I've yet to be able to make it work.

Bottom line: On "blur," I want the color of the text in my date field to change from grey to black.

How?
Avatar of Alexandre Simões
Alexandre Simões
Flag of Switzerland image

Remove the inline style that sets the grey color and add this style:
input:focus {
    color: #ccc !important;
}

Open in new window

I just don't agree doing this because the user can edit the text manually and it will be grayed out
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bruce Gust

ASKER

Perfect, hielo! That definitely does the trick. And thanks for weighing Alexandre, but the user can't manually adjust what goes into that field.

However...

Guys, I'm still not where I need to be and if you would like, I have what amounts to "part II" of this question at https://www.experts-exchange.com/questions/28699331/I'm-not-positioning-these-elements-in-my-code-correctly-What-do-I-need-to-change.html

Thanks!