0

I can't change display Input value mm/dd/yyyy to dd/mm/yyyy in MVC C# Help Me, Thank'all

This is my code

  1. In file .cshtml:
  <div>
         <label for="pass" class="label">What is your Birthday?</label>
         <input id="pass" type="date" name="birthdate" class="input">
                 
  </div>
  1. And this my View This is my View

I tried to try some of this code but no success.

  -      $("input").on("change", function() {
            this.setAttribute(
              "data-date",
               moment(this.value, "MM-DD-YYYY")
        .      format( this.getAttribute("data-date-format") )
            )
           }).trigger("change")

Thank's All and help Me, Thanks again!

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
ThienND
  • 9
  • 3
  • I think the second solution here makes sense to me. [Solutions](https://stackoverflow.com/questions/8503969/convert-mm-dd-yyyy-to-dd-mm-yyyy) – MambaForever Oct 26 '22 at 18:45
  • 1
    C# / MVC is irrelevant here. This is related to the HTML and CSS on the page... and we haven't seen the css yet. – Joel Coehoorn Oct 26 '22 at 18:49

0 Answers0