-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inline View, Incr/Decr with Arrow Keys and Mousewheel
DateTimePicker can be added as an inline element by setting `isInline: true`. Since DateTimePicker is added inline, input element should be explicitly specified with `inputElement: <jQuery object of Element>`. Check Example [Inline View](demo/View-Inline.htm). Input Elements on DateTimePicker can be made read-only with `readonlyInputs: true`. Header of DateTimePicker Element can be removed with `showHeader: false`. Added functionality to increment or decrement values of dates using Up and Down Arrow Keys as well as using Mouse Wheel.
- Loading branch information
Showing
44 changed files
with
491 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<!DOCTYPE html> | ||
|
||
<html> | ||
|
||
<head> | ||
|
||
<title>DateTimePicker in Custom Container</title> | ||
|
||
<link rel="stylesheet" type="text/css" href="../src/DateTimePicker.css" /> | ||
|
||
<script type="text/javascript" src="jquery-1.11.0.min.js"></script> | ||
<script type="text/javascript" src="../src/DateTimePicker.js"></script> | ||
|
||
<!--[if lt IE 9]> | ||
<link rel="stylesheet" type="text/css" href="../src/DateTimePicker-ltie9.css" /> | ||
<script type="text/javascript" src="../src/DateTimePicker-ltie9.js"></script> | ||
<![endif]--> | ||
|
||
<style type="text/css"> | ||
|
||
p | ||
{ | ||
margin-left: 20px; | ||
} | ||
|
||
#input-date | ||
{ | ||
display: none; | ||
} | ||
|
||
#dtBox | ||
{ | ||
margin: 0px auto; | ||
width: 700px; | ||
height: auto; | ||
} | ||
|
||
|
||
</style> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<p>Date : </p> | ||
<span id="input-date" type="text" data-field="date"></span> | ||
|
||
<div id="dtBox"></div> | ||
|
||
<script type="text/javascript"> | ||
|
||
$(document).ready(function() | ||
{ | ||
$("#dtBox").DateTimePicker({ | ||
|
||
isInline: true, | ||
|
||
inputElement: $("#input-date"), | ||
|
||
buttonsToDisplay: [], | ||
|
||
showHeader: false, | ||
|
||
readonlyInputs: false, | ||
|
||
setValueInTextboxOnEveryClick: true, | ||
|
||
settingValueOfElement: function(oDTP, sElemValue, dElemValue, $oElem) | ||
{ | ||
console.log("settingValueOfElement : " + sElemValue); | ||
console.log(dElemValue); | ||
} | ||
|
||
}); | ||
}); | ||
|
||
</script> | ||
|
||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
/* ----------------------------------------------------------------------------- | ||
jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile | ||
Version 0.1.30 | ||
Version 0.1.31 | ||
Copyright (c)2016 Curious Solutions LLP and Neha Kadam | ||
http://curioussolutions.github.io/DateTimePicker | ||
https://github.com/CuriousSolutions/DateTimePicker | ||
----------------------------------------------------------------------------- */ | ||
|
||
Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length,c=Number(arguments[1])||0;for(c=0>c?Math.ceil(c):Math.floor(c),0>c&&(c+=b);b>c;c++)if(c in this&&this[c]===a)return c;return-1}),jQuery.fn.fadeIn=function(){this.show()},jQuery.fn.fadeOut=function(){this.hide()}; | ||
Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length,c=Number(arguments[1])||0;for(c=c<0?Math.ceil(c):Math.floor(c),c<0&&(c+=b);c<b;c++)if(c in this&&this[c]===a)return c;return-1}),jQuery.fn.fadeIn=function(){this.show()},jQuery.fn.fadeOut=function(){this.hide()}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* ----------------------------------------------------------------------------- | ||
jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile | ||
Version 0.1.31 | ||
Copyright (c)2016 Curious Solutions LLP, Neha Kadam, and Yanike Mann | ||
http://curioussolutions.github.io/DateTimePicker | ||
https://github.com/CuriousSolutions/DateTimePicker | ||
----------------------------------------------------------------------------- */ | ||
|
||
/* Detect iOS device */ | ||
var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; | ||
|
||
/* Execute if iOS device is found */ | ||
if (iOS) { | ||
function dtpickerContMoveiOS() { | ||
/* Execute if iOS device is found */ | ||
if (iOS) { | ||
/* Get SCROLL location */ | ||
var tscroll = window.scrollY /*Modern Way (Chrome, Firefox)*/ || window.pageYOffset /*Modern IE, including IE11*/ || document.documentElement.scrollTop /*Old IE, 6,7,8*/ ; | ||
/* Calculate position */ | ||
var topscroll = (((document.documentElement.clientHeight / 2) + tscroll) + "px"); | ||
/* Make POSITION ABSOLUTE so iOS devices can interact with DateTimePicker */ | ||
jQuery('.dtpicker-mobile').css('position', 'absolute'); | ||
jQuery('.dtpicker-cont').css('position', 'absolute'); | ||
/* Scroll DateTimePicker into position */ | ||
jQuery('.dtpicker-cont').css('top', topscroll); | ||
} | ||
} | ||
|
||
/* WINDOW EVENTLISTENER to LOAD and SCROLL */ | ||
if (window.addEventListener) { | ||
window.addEventListener('load', dtpickerContMoveiOS, false); | ||
window.addEventListener('scroll', dtpickerContMoveiOS, false); | ||
} else if (window.attachEvent) { | ||
window.attachEvent('on' + 'load', dtpickerContMoveiOS); | ||
window.attachEvent('on' + 'scroll', dtpickerContMoveiOS); | ||
} else { | ||
window['on' + 'load'] = dtpickerContMoveiOS; | ||
window['on' + 'scroll'] = dtpickerContMoveiOS; | ||
} | ||
|
||
/* Makes readonly INPUTS on iOS correctly work */ | ||
$(function() { | ||
$('input[readonly]').on('focus', function(ev) { | ||
$(this).trigger('blur'); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.