Home > Back-end >  Is there a way to display the form field as mm/yyyy in html form?
Is there a way to display the form field as mm/yyyy in html form?

Time:02-18

I'm trying to have a form field with mm/yyyy as an input. Can you help me in suggesting a way to have this date format ?

CodePudding user response:

In your html code use the input element and give it the "month" type (YYYY-MM)

<input type="month" id="something" />

To get the date and year, you can use javascript

var date = document.getElementById("something").value

CodePudding user response:

Enter Birthday month-year: Try this:

  • Related