File tree Expand file tree Collapse file tree 2 files changed +82
-0
lines changed Expand file tree Collapse file tree 2 files changed +82
-0
lines changed Original file line number Diff line number Diff line change 6
6
- To use this plugin you must include jQuery and jQuery UI with datepicker and slider
7
7
- Include timepicker-addon script
8
8
- now use timepicker with $('#selector').datetimepicker() or $('#selector').timepicker()
9
+ - To run see demo.html
9
10
10
11
Contributing Code - Please Read!
11
12
--------------------------------
12
13
All code contributions and bug reports are much appreciated. Please be sure to apply your fixes to the "dev" branch.
14
+
15
+ Example
16
+ --------------------------------
17
+ <html >
18
+ <head >
19
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
20
+ <script type="text/javascript" src="http://code.jquery.com/ui/1.8.16/jquery-ui.min.js"></script>
21
+ <link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.8.16/themes/ui-lightness/jquery-ui.css" />
22
+ <script type="text/javascript" src="jquery-ui-timepicker-addon.js"></script>
23
+
24
+ <style type="text/css">
25
+ /* css for timepicker */
26
+ #ui-datepicker-div{ font-size: 80%; }
27
+ .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
28
+ .ui-timepicker-div dl { text-align: left; }
29
+ .ui-timepicker-div dl dt { height: 25px; }
30
+ .ui-timepicker-div dl dd { margin: -25px 10px 10px 65px; }
31
+ .ui-timepicker-div td { font-size: 90%; }
32
+ .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
33
+ </style>
34
+
35
+ </head >
36
+
37
+ <script type =" text/javascript " >
38
+ $ (' document' ).ready (function () {
39
+
40
+ $ (" #date" ).datetimepicker ({
41
+ ampm: true ,
42
+ timeFormat: ' hh:mm TT'
43
+ });
44
+
45
+ });
46
+ </script >
47
+
48
+ <body >
49
+
50
+ <input id="date">
51
+
52
+ </body >
53
+ </html >
Original file line number Diff line number Diff line change
1
+ < html >
2
+ < head >
3
+ < script type ="text/javascript " src ="http://code.jquery.com/jquery-1.7.1.min.js "> </ script >
4
+ < script type ="text/javascript " src ="http://code.jquery.com/ui/1.8.16/jquery-ui.min.js "> </ script >
5
+ < link rel ="stylesheet " type ="text/css " href ="http://code.jquery.com/ui/1.8.16/themes/ui-lightness/jquery-ui.css " />
6
+ < script type ="text/javascript " src ="jquery-ui-timepicker-addon.js "> </ script >
7
+
8
+ < style type ="text/css ">
9
+
10
+ /* css for timepicker */
11
+ # ui-datepicker-div { font-size : 80% ; }
12
+ .ui-timepicker-div .ui-widget-header { margin-bottom : 8px ; }
13
+ .ui-timepicker-div dl { text-align : left; }
14
+ .ui-timepicker-div dl dt { height : 25px ; }
15
+ .ui-timepicker-div dl dd { margin : -25px 10px 10px 65px ; }
16
+ .ui-timepicker-div td { font-size : 90% ; }
17
+ .ui-tpicker-grid-label { background : none; border : none; margin : 0 ; padding : 0 ; }
18
+
19
+ </ style >
20
+
21
+ </ head >
22
+
23
+ < script type ="text/javascript ">
24
+ $ ( 'document' ) . ready ( function ( ) {
25
+
26
+ $ ( "#date" ) . datetimepicker ( {
27
+ ampm : true ,
28
+ timeFormat : 'hh:mm TT'
29
+ } ) ;
30
+
31
+ } ) ;
32
+ </ script >
33
+
34
+ < body >
35
+
36
+
37
+ < input id ="date ">
38
+
39
+
40
+ </ body >
41
+ </ html >
You can’t perform that action at this time.
0 commit comments