Skip to content
This repository was archived by the owner on Jun 21, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c4bfd38
Allow to multi increment minutes and hours
JordyMoos Dec 3, 2014
8d11160
Added the new options to the readme
JordyMoos Dec 3, 2014
ae6ca97
Fix tab/spaces issue
JordyMoos Dec 3, 2014
5cfe240
Fix tab/spaces issue
JordyMoos Dec 3, 2014
f4cbb16
Fix tab/spaces issue
JordyMoos Dec 3, 2014
06cbb4f
Fix tab/spaces issue
JordyMoos Dec 3, 2014
c4bad4e
Bug fix with am/pm
JordyMoos Dec 3, 2014
c79c45d
Fix tab/spacing
JordyMoos Dec 4, 2014
cf0e8ac
- Added the getTime function
JordyMoos Dec 4, 2014
6f0ac5f
Wrong lookup to the twelvehour option
JordyMoos Jan 16, 2015
04842a7
Add intellij idea to gitignore
JordyMoos Jan 21, 2015
7a6f8ab
Merge remote-tracking branch 'origin/get-datetime'
JordyMoos Jan 21, 2015
f2b0dbc
Merged the get-datetime branch.
JordyMoos Jan 21, 2015
cf9ce1f
Updated the readme for the version
JordyMoos Jan 21, 2015
ca32745
adding a new option to allow submit on clicking on am/pm rather than …
technopahadi Mar 12, 2015
d300068
Merge pull request #2 from rishabhp/master
JordyMoos Mar 15, 2015
aa9ad1d
Fix where time swapped back to am
JordyMoos Jun 4, 2015
b729715
Merge pull request #6 from JordyMoos/am-pm
JordyMoos Jun 5, 2015
b53e82f
Added the minified.
Jun 5, 2015
fe7c155
Merge pull request #7 from JordyMoos/am-pm
JordyMoos Jun 5, 2015
2003ca3
Added support for HTML5 input fields
flibdev Jun 10, 2015
b72e12b
Bug fix for 12 and 00 hours being swapped
flibdev Jun 10, 2015
453609a
Enabled & tested HTML5 time output
flibdev Jun 10, 2015
ab81017
Fixed logic for HTML5 output
flibdev Jun 10, 2015
655bdd7
Readded magically missing lines
flibdev Jun 10, 2015
133f08c
Updated README with new options
flibdev Jun 12, 2015
da993af
Merge pull request #9 from flibX0r/master
JordyMoos Jun 13, 2015
002ebad
Implement adaptive vertical placement
madand Jul 2, 2015
f6aeb0a
Merge pull request #10 from MadAnd/adaptive-vertical-placement
JordyMoos Jul 8, 2015
a1a9755
Build distfiles with the adaptive placement patch
madand Jul 11, 2015
fdd1081
Merge pull request #11 from MadAnd/build-adaptive-js
JordyMoos Jul 11, 2015
b87a0b3
Triggers and callbacks try
ErDmKo Jul 16, 2015
c0b4b18
Insert time to callbacks
ErDmKo Jul 16, 2015
482f70e
second time try
ErDmKo Jul 16, 2015
19ea120
Trigger ankother try
ErDmKo Jul 16, 2015
292258c
Merge pull request #12 from ErDmKo/master
JordyMoos Jul 17, 2015
8edb139
triggerhandler to trigger event
Feb 8, 2016
f5175b7
Merge pull request #16 from srinivasdamam/master
JordyMoos Mar 23, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
node_modules
node_modules
bower_components
.idea
*.iml
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ if (something) {
// Manual operations (after clockpicker is initialized).
$('#demo-input').clockpicker('show') // Or hide, remove ...
.clockpicker('toggleView', 'minutes');

// Get the time of single clockpicker
var dateObject = $('#demo-input').clockpicker('getTime');
console.log(dateObject);

// Get the time of a clockpicker list
$('.clockpicker').clockpicker('getTime', function(dateObject) {
// The clockpicker element
console.log(this);
console.log(dateObject);
});
}
</script>
```
Expand All @@ -69,14 +80,18 @@ if (something) {

| Name | Default | Description |
| ---- | ------- | ----------- |
| default | '' | default time, 'now' or '13:14' e.g. |
| placement | 'bottom' | popover placement |
| default | '' | default time, 'now', Date object or '13:14' e.g. |
| placement | 'bottom' | popover placement. Supported values: 'top', 'bottom', 'left', 'right', 'top-adaptive', 'bottom-adaptive'. |
| align | 'left' | popover arrow align |
| donetext | '完成' | done button text |
| autoclose | false | auto close when minute is selected |
| twelvehour | false | enables twelve hour mode with AM & PM buttons |
| vibrate | true | vibrate the device when dragging clock hand |
| fromnow | 0 | set default time to * milliseconds from now (using with default = 'now') |
| fromnow | 0 | set default time to * milliseconds from now (using with default = 'now' or default = Date) |
| hourstep | 1 | allow to multi increment the hour |
| minutestep | 1 | allow to multi increment the minute |
| ampmSubmit | false | allow submit with AM and PM buttons instead of the minute selection/picker |
| addonOnly | false | disables the focus and click triggers on the input field (to allow delegation to native pickers) |
| init | | callback function triggered after the colorpicker has been initiated |
| beforeShow | | callback function triggered before popup is shown |
| afterShow | | callback function triggered after popup is shown |
Expand All @@ -95,6 +110,7 @@ if (something) {
| hide | | hide the clockpicker |
| remove | | remove the clockpicker (and event listeners) |
| toggleView | 'hours' or 'minutes' | toggle to hours or minutes view |
| getTime | Optional callback (Can be used for list of elements) | Returns Date object. (Will call the callback if callback is given) |

## What's included

Expand Down Expand Up @@ -135,6 +151,13 @@ gulp

## Change log

0.1.0

* Able to set incremental step for hours and minutes
* Added getTime
* Able to set the default value via Date object
* Some AM & PM bug fixes

0.0.7

* Enables twelve hour mode with AM & PM buttons.
Expand Down
38 changes: 38 additions & 0 deletions am_pm_submit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ClockPicker</title>
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="dist/bootstrap-clockpicker.min.css">

<style type="text/css">
body {
padding: 100px;
}
</style>

</head>
<body>

<input id="timepicker" type="text" name="timepicker" value="">


<script type="text/javascript" src="assets/js/jquery.min.js"></script>
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="dist/jquery-clockpicker.js"></script>

<script type="text/javascript">

$('#timepicker').clockpicker({
autoclose: true,
twelvehour: true,
minutestep: 15,
ampmSubmit: true
});

</script>
</body>
</html>
Loading