Skip to content

Commit

Permalink
Inline View, Incr/Decr with Arrow Keys and Mousewheel
Browse files Browse the repository at this point in the history
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
nehakadam committed Jul 30, 2016
1 parent ed00cd6 commit 7ae1c2c
Show file tree
Hide file tree
Showing 44 changed files with 491 additions and 194 deletions.
2 changes: 1 addition & 1 deletion DateTimePicker.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

"docs": "http://curioussolutions.github.io/DateTimePicker/",

"version": "0.1.30",
"version": "0.1.31",

"licenses": [
{
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"input"
],

"version": "0.1.30",
"version": "0.1.31",

"homepage": "http://curioussolutions.github.io/DateTimePicker/",

Expand Down
81 changes: 81 additions & 0 deletions demo/View-Inline.htm
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>
2 changes: 1 addition & 1 deletion dist/DateTimePicker-ltie9.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion dist/DateTimePicker-ltie9.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion dist/DateTimePicker-ltie9.min.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
4 changes: 2 additions & 2 deletions dist/DateTimePicker-ltie9.min.js
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()};
2 changes: 1 addition & 1 deletion dist/DateTimePicker.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion dist/DateTimePicker.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions dist/DateTimePicker_iOS_fix.js
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');
});
});
}
2 changes: 1 addition & 1 deletion dist/i18n/DateTimePicker-i18n-de.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/DateTimePicker-i18n-en.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/DateTimePicker-i18n-es.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/DateTimePicker-i18n-fr.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/DateTimePicker-i18n-it.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/DateTimePicker-i18n-ja.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/DateTimePicker-i18n-nb.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/DateTimePicker-i18n-nl.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/DateTimePicker-i18n-ro.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/DateTimePicker-i18n-ru.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/DateTimePicker-i18n-uk.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/DateTimePicker-i18n-zh-TW.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/DateTimePicker-i18n.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/DatetimePicker-i18n-zh-CN.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"input"
],

"version": "0.1.30",
"version": "0.1.31",

"homepage": "http://curioussolutions.github.io/DateTimePicker/",

Expand Down
2 changes: 1 addition & 1 deletion src/DateTimePicker-ltie9.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion src/DateTimePicker-ltie9.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
2 changes: 1 addition & 1 deletion src/DateTimePicker.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
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
Expand Down
Loading

0 comments on commit 7ae1c2c

Please sign in to comment.