Skip to content

Commit

Permalink
data-parentelement For Initializing Multiple Pickers
Browse files Browse the repository at this point in the history
Added parentelement data attribute for initializing multiple pickers
with different properties on a single page.
This functionality was aleady their but it had to be included in
DateTimePicker plugin initialization code.
  • Loading branch information
nehakadam committed Oct 2, 2016
1 parent 75713f4 commit b6dc634
Show file tree
Hide file tree
Showing 48 changed files with 176 additions and 50 deletions.
4 changes: 2 additions & 2 deletions DateTimePicker.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

"keywords": ["date", "time", "datetime", "plugin", "picker", "DatePicker", "TimePicker", "DateTimePicker", "Responsive", "Flat", "Mobile", "jquery"],

"version": "0.1.35",

"author": {
"name": "Curious Solutions",
"url": "http://curioussolutions.in/"
Expand All @@ -29,8 +31,6 @@

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

"version": "0.1.34",

"licenses": [
{
"type": "MIT",
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.34",
"version": "0.1.35",

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

Expand Down
112 changes: 112 additions & 0 deletions demo/BasicExamples-ElementsGroup-DataAttribute.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<!DOCTYPE html>

<html>

<head>

<title>Basic Examples -- Elements Group</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
{
width: 200px;
padding: 10px;
margin-left: 20px;
margin-bottom: 20px;
}

.group1
{
border: 1px solid skyblue;
margin: 20px;
border-radius: 3px;
}

.group2
{
border: 1px solid orange;
margin: 20px;
border-radius: 3px;
}

</style>

</head>

<body>

<div class="group1">

<!------------------------ Date Picker ------------------------>
<p>Date : </p>
<input type="text" data-field="date" readonly>

<!------------------------ Time Picker ------------------------>
<p>Time : </p>
<input type="text" data-field="time" readonly>

<!---------------------- DateTime Picker ---------------------->
<p>DateTime : </p>
<input type="text" data-field="datetime" readonly>

</div>

<div class="group2">

<!------------------------ Date Picker ------------------------>
<p>Date : </p>
<input type="text" data-field="date" readonly>

<!------------------------ Time Picker ------------------------>
<p>Time : </p>
<input type="text" data-field="time" readonly>

<!---------------------- DateTime Picker ---------------------->
<p>DateTime : </p>
<input type="text" data-field="datetime" readonly>

</div>

<div id="dtBox1" data-parentelement=".group1"></div>

<div id="dtBox2" data-parentelement=".group2"></div>

<script type="text/javascript">

$(document).ready(function()
{

$("#dtBox1").DateTimePicker(
{

});

$("#dtBox2").DateTimePicker(
{
dateFormat: "dd-MMM-yyyy"
});

});

</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.34
Version 0.1.35
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.34
Version 0.1.35
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.34
Version 0.1.35
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.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.34
Version 0.1.35
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.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.34
Version 0.1.35
Copyright (c)2016 Curious Solutions LLP and Neha Kadam
http://curioussolutions.github.io/DateTimePicker
https://github.com/CuriousSolutions/DateTimePicker
Expand Down
9 changes: 8 additions & 1 deletion dist/DateTimePicker.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.34
Version 0.1.35
Copyright (c)2016 Curious Solutions LLP and Neha Kadam
http://curioussolutions.github.io/DateTimePicker
https://github.com/CuriousSolutions/DateTimePicker
Expand Down Expand Up @@ -298,12 +298,19 @@ $.cf = {
oDTP._setDateFormatArray(); // Set DateFormatArray
oDTP._setTimeFormatArray(); // Set TimeFormatArray
oDTP._setDateTimeFormatArray(); // Set DateTimeFormatArray

console.log($(oDTP.element).data('parentelement') + " " + $(oDTP.element).attr('data-parentelement'));
if($(oDTP.element).data('parentelement') !== undefined)
{
oDTP.settings.parentElement = $(oDTP.element).data('parentelement');
}

if(oDTP.settings.isPopup && !oDTP.settings.isInline)
{
oDTP._createPicker();
$(oDTP.element).addClass("dtpicker-mobile");
}

if(oDTP.settings.isInline)
{
oDTP._createPicker();
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.

6 changes: 3 additions & 3 deletions dist/DateTimePicker.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/DateTimePicker_iOS_fix.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.34
Version 0.1.35
Copyright (c)2016 Curious Solutions LLP, Neha Kadam, and Yanike Mann
http://curioussolutions.github.io/DateTimePicker
https://github.com/CuriousSolutions/DateTimePicker
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/DateTimePicker-i18n-cs.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.34
Version 0.1.35
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-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.34
Version 0.1.35
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.34
Version 0.1.35
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.34
Version 0.1.35
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.34
Version 0.1.35
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.34
Version 0.1.35
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.34
Version 0.1.35
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.34
Version 0.1.35
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.34
Version 0.1.35
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.34
Version 0.1.35
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.34
Version 0.1.35
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.34
Version 0.1.35
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.34
Version 0.1.35
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.34
Version 0.1.35
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.34
Version 0.1.35
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.34",
"version": "0.1.35",

"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.34
Version 0.1.35
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.34
Version 0.1.35
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 b6dc634

Please sign in to comment.