Skip to content

Commit

Permalink
Merge branch 'vanilla'
Browse files Browse the repository at this point in the history
  • Loading branch information
owenmead committed Aug 1, 2017
2 parents 1f6b20e + fd5371e commit 7fc1a90
Show file tree
Hide file tree
Showing 34 changed files with 1,833 additions and 70 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 1.7.0 - TBA

- Add keyboard input option, see #610

## 1.6.1 - 2017-06-06

- Fix memory leak, fixes #630

## 1.6.0 - 2017-05-31

- Add custom parsers, see #613
- Re-introduce correct null behavor, fixes #654
- Pick a whole week, see #516
- Added `events` option: dates that you would like to differentiate from regular days, see #152
- Fix the (re)position issue, see #643, #642
- Configure if field is blurred when date is selected, see #631
- Prevent error when no field is bound, fixes #611

## 1.5.1 - 2016-10-28

- Only set attribute if field is bound, see #567
Expand Down
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion bower.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"package.json"
],
"license" : [
"BSD",
"0BSD",
"MIT"
],
"homepage": "https://github.com/owenmead/Pikaday",
Expand Down
2 changes: 1 addition & 1 deletion component.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pikaday-time",
"repo": "owenmead/Pikaday",
"description": "Time support added to pikaday",
"version": "1.5.1",
"version": "1.6.1",
"keywords": [
"datepicker",
"calendar",
Expand Down
25 changes: 21 additions & 4 deletions css/pikaday.css
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,21 @@ http://nicolasgallagher.com/micro-clearfix-hack/
font-weight: bold;
}

.is-selected .pika-button {
.is-selected .pika-button,
.has-event .pika-button {
color: #fff;
font-weight: bold;
background: #33aaff;
box-shadow: inset 0 1px 3px #178fe5;
border-radius: 3px;
}

.has-event .pika-button {
background: #005da9;
box-shadow: inset 0 1px 3px #0076c9;
}

.is-disabled .pika-button,
.is-inrange .pika-button {
background: #D5E9F7;
}
Expand All @@ -198,15 +205,25 @@ http://nicolasgallagher.com/micro-clearfix-hack/
border-radius: 3px;
}

.is-disabled .pika-button,
.is-outside-current-month .pika-button {
.is-disabled .pika-button {
pointer-events: none;
cursor: default;
color: #999;
opacity: .3;
}

.pika-button:hover {
.is-outside-current-month .pika-button {
color: #999;
opacity: .3;
}

.is-selection-disabled {
pointer-events: none;
cursor: default;
}

.pika-button:hover,
.pika-row.pick-whole-week:hover .pika-button {
color: #fff;
background: #ff8000;
box-shadow: none;
Expand Down
Empty file modified css/site.css
100644 → 100755
Empty file.
Empty file modified css/theme.css
100644 → 100755
Empty file.
Empty file modified css/triangle.css
100644 → 100755
Empty file.
Empty file modified examples/amd.html
100644 → 100755
Empty file.
45 changes: 45 additions & 0 deletions examples/aria-label.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<title>Pikaday - custom trigger element example</title>
<meta name="author" content="Ramiro Rikkert">
<link rel="stylesheet" href="../css/pikaday.css">
<link rel="stylesheet" href="../css/site.css">
</head>
<body>
<a href="https://github.com/dbushell/Pikaday"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>

<h1>Pikaday - custom trigger example</h1>

<p class="large">A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.</p>

<label for="datepicker">Date:</label>
<br>
<input type="text" id="datepicker">


<h2>What is this?</h2>

<p>Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the <a href="https://github.com/dbushell/Pikaday/issues">GitHub issue tracker</a>, thanks!</p>

<p class="small">Copyright © 2014 <a href="http://dbushell.com/">David Bushell</a> | BSD &amp; MIT license | Example by <a href="https://github.com/rikkert">Ramiro Rikkert</a></p>


<script src="../pikaday.js"></script>
<script>

new Pikaday(
{
field: document.getElementById('datepicker'),
trigger: document.getElementById('datepicker-button'),
minDate: new Date(2000, 0, 1),
ariaLabel: 'Custom label',
maxDate: new Date(2020, 12, 31),
yearRange: [2010,2020]
});

</script>
</body>
</html>
Empty file modified examples/bound-container.html
100644 → 100755
Empty file.
Empty file modified examples/calendars.html
100644 → 100755
Empty file.
Empty file modified examples/container.html
100644 → 100755
Empty file.
57 changes: 57 additions & 0 deletions examples/date-fns.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<title>Pikaday - date-fns example</title>
<meta name="author" content="Ramiro Rikkert">
<link rel="stylesheet" href="../css/pikaday.css">
<link rel="stylesheet" href="../css/site.css">
</head>
<body>
<a href="https://github.com/dbushell/Pikaday"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>

<h1>Pikaday + date-fns</h1>

<p class="large">A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.</p>

<label for="datepicker">Date:</label>
<br>
<input type="text" id="datepicker">
<div id="selected"></div>
<br>

<h2>What is this?</h2>

<p>Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the <a href="https://github.com/dbushell/Pikaday/issues">GitHub issue tracker</a>, thanks!</p>

<p class="small">Copyright © 2014 <a href="http://dbushell.com/">David Bushell</a> | BSD &amp; MIT license | Example by <a href="https://github.com/rikkert">Ramiro Rikkert</a></p>


<script src="https://cdnjs.cloudflare.com/ajax/libs/date-fns/1.28.5/date_fns.min.js"></script>
<script src="../pikaday.js"></script>
<script>

// You can get and set dates with custom formatter (and thus also date-fns)
new Pikaday(
{
field: document.getElementById('datepicker'),
toString: function(date, format) {
return dateFns.format(date, format);
},
parse: function(dateString, format) {
return dateFns.parse(dateString);
},
onSelect: function(selectedDate) {
// not necessary, just showing off
if (dateFns.isValid(selectedDate)) {
var p = document.createElement('p');
p.innerText = dateFns.distanceInWordsToNow(selectedDate, {addSuffix: true});
document.getElementById('selected').appendChild(p);
}
}
});

</script>
</body>
</html>
Empty file modified examples/date-range.html
100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion examples/daysInNextMonth.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ <h2>What is this?</h2>
maxDate: new Date(2020, 12, 31),
yearRange: [2000,2020],

showDaysInNextAndPreviousMonths: true
showDaysInNextAndPreviousMonths: true,
enableSelectionDaysInNextAndPreviousMonths: true
});

</script>
Expand Down
Empty file modified examples/diableDayFn.html
100644 → 100755
Empty file.
Empty file modified examples/jquery-amd.html
100644 → 100755
Empty file.
Empty file modified examples/jquery.html
100644 → 100755
Empty file.
Empty file modified examples/moment.html
100644 → 100755
Empty file.
45 changes: 45 additions & 0 deletions examples/pick-whole-week.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<title>Pikaday - pickWholeWeek example</title>
<meta name="author" content="Lei Zhao">
<link rel="stylesheet" href="../css/pikaday.css">
<link rel="stylesheet" href="../css/site.css">
</head>
<body>
<a href="https://github.com/dbushell/Pikaday"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>

<h1>Pikaday - pickWholeWeek example</h1>

<p class="large">A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.</p>

<label for="datepicker">Date:</label>
<br>
<input type="text" id="datepicker">

<h2>What is this?</h2>

<p>Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the <a href="https://github.com/dbushell/Pikaday/issues">GitHub issue tracker</a>, thanks!</p>

<p class="small">Copyright © 2014 <a href="http://dbushell.com/">David Bushell</a> | BSD &amp; MIT license | Example by <a href="https://github.com/leizhao4">Lei Zhao</a></p>

<script src="../pikaday.js"></script>
<script>

var field = document.getElementById('datepicker');
var picker = new Pikaday({
field: field,
pickWholeWeek: true,
onSelect: function (date) {
var sundayDate = date.getDate() - date.getDay();
var sunday = new Date(date.setDate(sundayDate));
var saturday = new Date(date.setDate(sundayDate + 6));
field.value = sunday.toLocaleDateString() + ' - ' + saturday.toLocaleDateString();
}
});

</script>
</body>
</html>
Empty file modified examples/positions.html
100644 → 100755
Empty file.
Empty file modified examples/theme.html
100644 → 100755
Empty file.
Empty file modified examples/trigger.html
100644 → 100755
Empty file.
Empty file modified examples/weeknumbers.html
100644 → 100755
Empty file.
Empty file modified index.html
100644 → 100755
Empty file.
Loading

0 comments on commit 7fc1a90

Please sign in to comment.