When a page loads, the datepicker element shows the placeholder greyed text “Pick a date”.
before:
When a person manually selects a date using the datepicker the chosen date appears in black in the text box on the element.
after:
I want the placeholder text on load, but in some cases I want to put a date in this text box using code and so it appears as if it has been selected by the user (looks like After photo).
For instance, if I wanted to display today’s date I set the value of the datepicker:
$w(“#datePicker1”).value = new Date();
But how do I get this date to also appear as black text in the datepicker text box?