How to change Date Picker text Styles based on logic

0
Hi, I am using a date picker which is working fine. But what i want is , If a user select any future date It should display in Red color and if the date is less than current date then it should be displayed in bold letters. Is there any possible way to do that ?
asked
2 answers
0

Hi shaan,
if your using bootstrap date picker widget u have an option like
min date and max date which meets the date criteria 

current date : 11/12/2018 is bold
the same you can do it for future date  in red 
using css  

td.active.day {

  1. background: #f265a7 !important;
  2. font-weight: bold;
  3. border-radius: 50%;

}
example code
td.day{

color:red
}

hope this helps !!

answered
0

You could add some conditional formatting. If date meets criteria, show/hide object with styling.

answered