construyendo la opción monthNames la opción monthNames
Sintaxis:
$(".selector").datepicker( {monthNames: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ]} );
Enfoque: Primero, agregue los scripts jQuery UI necesarios para su proyecto.
<enlace href = «https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css» rel = «hoja de estilo»>
<script src = «https://code. jquery.com/jquery-1.10.2.js”></script>
<script src = “https://code.jquery.com/ui/1.10.4/jquery-ui.js”></script>
Ejemplo 1:
HTML
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <link href= "https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet"> <script src= "https://code.jquery.com/jquery-1.10.2.js"> </script> <script src= "https://code.jquery.com/ui/1.10.4/jquery-ui.js"> </script> <!-- JavaScript code --> <script> $(function () { $("#gfg").datepicker( { dateFormat: "yy/dd/mm/MM", monthNames: ["jan", "feb", "mar", "april", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"] } ); }); </script> </head> <body> <h1>GeeksforGeeks</h1> <h3>jQuery UI | datepicker monthNames option</h3> <p>Enter Date: <input type="text" id="gfg"></p> </body> </html>
Producción:
Referencia: https://api.jqueryui.com/category/widgets/