user3896397
user3896397

Reputation: 55

How to change date format using a class?

I want to change the date format in a text box where the date format is d-m-y I used the class w8em format-d-m-y highlight-days-67 range-low-today is it possible if I change it into w8em format-m-d-y highlight-days-67 range-low-today to change the d-m-y to m-d-y

here's is my form.

Start Date: <input type="readonly" class="w8em format-d-m-y highlight-days-67 range-low-today" name="start" id="sd" value="" maxlength="10" required=""<br>
End Date:<input type="readonly" class="w8em format-d-m-y highlight-days-67 range-low-today" name="end" id="ed" value="" maxlength="10" required=""<br>

Upvotes: 0

Views: 314

Answers (1)

user3729197
user3729197

Reputation: 11

You can try using JavaScript:

document.getElementById( "sd" ).className = "w8em format-m-d-y highlight-days-67 range-low-today";

Upvotes: 1

Related Questions