creativetimofficial / ct-material-dashboard-pro

Material Dashboard Pro - Premium Bootstrap 5 Admin
https://demos.creative-tim.com/material-dashboard-pro/pages/dashboards/analytics
116 stars 28 forks source link

I want to change date format on datepicker input below from m/d/y to d/m/y. #266

Closed cheespernx closed 4 years ago

cheespernx commented 4 years ago

<input class="form-control datepicker" id="prazo" type="text" required name="prazo">

cheespernx commented 4 years ago

And translate it to pt-br i looked for an awnser in old issues around the github, stack or google. But all of solutions does not work for me.

groovemen commented 4 years ago

Hello @nexusnx,

Thank you for using our products, all you have to do is to set the date format (d/m/y) when you initialize the picker:

$('.datepicker').datepicker({
    format: 'mm/dd/yyyy'
})

Hope that information helps you. Please let us know if we can help you with anything else.

All the best, Stefan