1<div class="input-group date" data-provide="datepicker">
2 <input type="text" class="form-control">
3 <div class="input-group-addon">
4 <span class="glyphicon glyphicon-th"></span>
5 </div>
6</div>
7
1<!doctype html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <title>jQuery UI Datepicker - Default functionality</title>
7 <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
8 <link rel="stylesheet" href="/resources/demos/style.css">
9 <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
10 <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
11 <script>
12
13 </script>
14</head>
15<body>
16
17<p>Date: <input type="text" id="datepicker"></p>
18
19
20</body>
21</html>
22
1############### JS ##############
21. npm i jquery-datetimepicker
3
42. Include inside js file
5
6import "jquery-datetimepicker";
7
8$('#datetimepicker').datetimepicker();
9
10############## CSS ###################
11
123. Include inside css/scss file
13
14@import "jquery-datetimepicker/build/jquery.datetimepicker.min.css";
15
1$('.timepicker').timepicker({
2 timeFormat: 'h:mm p',
3 interval: 15,
4 minTime: '10',
5 maxTime: '6:00pm',
6 defaultTime: '11',
7 startTime: '10:00',
8 dynamic: false,
9 dropdown: true,
10 scrollbar: true
11});
1<!doctype html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <title>jQuery UI Datepicker - Default functionality</title>
7 <link rel="stylesheet" href="//code.jquery.com/ui/1.13.0/themes/base/jquery-ui.css">
8 <link rel="stylesheet" href="/resources/demos/style.css">
9 <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
10 <script src="https://code.jquery.com/ui/1.13.0/jquery-ui.js"></script>
11 <script>
12 $( function() {
13 $( "#datepicker" ).datepicker();
14 } );
15 </script>
16</head>
17<body>
18
19<p>Date: <input type="text" id="datepicker"></p>
20
21
22</body>
23</html>
24