Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

245
Views
How to change date format of html date picker

I am using AngularJs to create a form where I need to add a date picker which should show date in format of mm-dd-yyyy. But the default HTML5 date picker shows date in dd-mm-yyyy format. Is there any way to show date in mm-dd-yyyy format ?

My code -

<div>
    <div class="col-md-6">
        <div  class="position-relative form-group">
            <label for="123" class="font-weight-bold">Date of Birth <span class="text-danger">*</span></label>
            <div id="dob" class="input-group date">
                <input type="date" class="form-control required" id="dob" ng-model="data.DOB" required />
            </div>
        </div>
    </div>
    <button ng-click="submit(data)">Submit</button>
</div>
 

$scope.submit = function(data) {
            console.log(data);
        }

How can I achieve this?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The displayed date format will differ from the actual value — the displayed date is formatted based on the locale of the user's browser, but the parsed value is always formatted yyyy-mm-dd.

Check this for more details - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!