jQuery - Widget DatePicker

La description

le Widget DatePickerLa fonction peut être utilisée avec des widgets dans JqueryUI. Il se concentre sur l'entrée pour ouvrir un calendrier interactif dans une petite superposition.

Syntaxe

Voici la syntaxe simple pour utiliser DatePicker -

$( "#datepicker" ).datepicker();

Exemple

Voici un exemple simple montrant l'utilisation de DatePicker -

<!doctype html>
<html lang = "en">
   <head>
      <meta charset = "utf-8">
      <title>jQuery UI Datepicker - Default functionality</title>
		
      <link rel = "stylesheet" 
         href = "//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
			
      <script type = "text/javascript" 
         src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js">
      </script>
		
      <script type = "text/javascript" 
         src = "https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js">
      </script>
 
      <script>
         $(function() {
            $( "#datepicker" ).datepicker();
         });
      </script>
   </head>

   <body>
      <p>Date: <input type = "text" id = "datepicker"></p>
   </body>
</html>

Cela produira le résultat suivant -

jquery-widgets.htm