Skip to content
This repository has been archived by the owner on Aug 20, 2022. It is now read-only.

Commit

Permalink
build: release 1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuanchen committed Jan 6, 2019
1 parent a3254ae commit 7304085
Show file tree
Hide file tree
Showing 12 changed files with 205 additions and 125 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## next
## 1.0.4 (Jan 6, 2019)

- Fix wrong future month selection when today is 31 (#195).
- Fix month picking issue when the format only contains `YYYY` and `MM` (#193).
Expand Down
15 changes: 8 additions & 7 deletions dist/datepicker.common.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Datepicker v1.0.3
* Datepicker v1.0.4
* https://fengyuanchen.github.io/datepicker
*
* Copyright 2014-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-12-20T12:51:42.329Z
* Date: 2019-01-06T02:42:36.188Z
*/

'use strict';
Expand Down Expand Up @@ -634,7 +634,6 @@ var handlers = {
this.showView(VIEWS.MONTHS);
} else {
$target.addClass(options.pickedClass).siblings().removeClass(options.pickedClass);
this.renderYears();
this.hideView();
}

Expand All @@ -654,8 +653,8 @@ var handlers = {
}

viewDate.setFullYear(viewYear);
viewDate.setMonth(viewMonth);
viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));
viewDate.setMonth(viewMonth);
this.renderDays();
break;

Expand All @@ -679,16 +678,18 @@ var handlers = {

case 'month':
viewMonth = $.inArray($target.text(), options.monthsShort);
date.setMonth(viewMonth);
date.setFullYear(viewYear); // Set date before month to avoid month changing (#195)

date.setDate(getMinDay(viewYear, viewMonth, viewDay));
viewDate.setMonth(viewMonth);
date.setMonth(viewMonth);
viewDate.setFullYear(viewYear);
viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));
viewDate.setMonth(viewMonth);

if (format.hasDay) {
this.showView(VIEWS.DAYS);
} else {
$target.addClass(options.pickedClass).siblings().removeClass(options.pickedClass);
this.renderMonths();
this.hideView();
}

Expand Down
4 changes: 2 additions & 2 deletions dist/datepicker.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Datepicker v1.0.3
* Datepicker v1.0.4
* https://fengyuanchen.github.io/datepicker
*
* Copyright 2014-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-12-20T12:51:39.076Z
* Date: 2019-01-06T02:42:32.803Z
*/

.datepicker-container {
Expand Down
15 changes: 8 additions & 7 deletions dist/datepicker.esm.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Datepicker v1.0.3
* Datepicker v1.0.4
* https://fengyuanchen.github.io/datepicker
*
* Copyright 2014-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-12-20T12:51:42.329Z
* Date: 2019-01-06T02:42:36.188Z
*/

import $ from 'jquery';
Expand Down Expand Up @@ -630,7 +630,6 @@ var handlers = {
this.showView(VIEWS.MONTHS);
} else {
$target.addClass(options.pickedClass).siblings().removeClass(options.pickedClass);
this.renderYears();
this.hideView();
}

Expand All @@ -650,8 +649,8 @@ var handlers = {
}

viewDate.setFullYear(viewYear);
viewDate.setMonth(viewMonth);
viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));
viewDate.setMonth(viewMonth);
this.renderDays();
break;

Expand All @@ -675,16 +674,18 @@ var handlers = {

case 'month':
viewMonth = $.inArray($target.text(), options.monthsShort);
date.setMonth(viewMonth);
date.setFullYear(viewYear); // Set date before month to avoid month changing (#195)

date.setDate(getMinDay(viewYear, viewMonth, viewDay));
viewDate.setMonth(viewMonth);
date.setMonth(viewMonth);
viewDate.setFullYear(viewYear);
viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));
viewDate.setMonth(viewMonth);

if (format.hasDay) {
this.showView(VIEWS.DAYS);
} else {
$target.addClass(options.pickedClass).siblings().removeClass(options.pickedClass);
this.renderMonths();
this.hideView();
}

Expand Down
15 changes: 8 additions & 7 deletions dist/datepicker.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Datepicker v1.0.3
* Datepicker v1.0.4
* https://fengyuanchen.github.io/datepicker
*
* Copyright 2014-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-12-20T12:51:42.329Z
* Date: 2019-01-06T02:42:36.188Z
*/

(function (global, factory) {
Expand Down Expand Up @@ -636,7 +636,6 @@
this.showView(VIEWS.MONTHS);
} else {
$target.addClass(options.pickedClass).siblings().removeClass(options.pickedClass);
this.renderYears();
this.hideView();
}

Expand All @@ -656,8 +655,8 @@
}

viewDate.setFullYear(viewYear);
viewDate.setMonth(viewMonth);
viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));
viewDate.setMonth(viewMonth);
this.renderDays();
break;

Expand All @@ -681,16 +680,18 @@

case 'month':
viewMonth = $.inArray($target.text(), options.monthsShort);
date.setMonth(viewMonth);
date.setFullYear(viewYear); // Set date before month to avoid month changing (#195)

date.setDate(getMinDay(viewYear, viewMonth, viewDay));
viewDate.setMonth(viewMonth);
date.setMonth(viewMonth);
viewDate.setFullYear(viewYear);
viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));
viewDate.setMonth(viewMonth);

if (format.hasDay) {
this.showView(VIEWS.DAYS);
} else {
$target.addClass(options.pickedClass).siblings().removeClass(options.pickedClass);
this.renderMonths();
this.hideView();
}

Expand Down
4 changes: 2 additions & 2 deletions dist/datepicker.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/datepicker.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/css/datepicker.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Datepicker v1.0.3
* Datepicker v1.0.4
* https://fengyuanchen.github.io/datepicker
*
* Copyright 2014-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-12-20T12:51:39.076Z
* Date: 2019-01-06T02:42:32.803Z
*/

.datepicker-container {
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<div class="container">
<div class="row">
<div class="col-md">
<h1>Datepicker <small class="h6">v1.0.3</small></h1>
<h1>Datepicker <small class="h6">v1.0.4</small></h1>
<p class="lead">A simple jQuery datepicker plugin.</p>
</div>
<div class="col-md">
Expand Down
15 changes: 8 additions & 7 deletions docs/js/datepicker.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Datepicker v1.0.3
* Datepicker v1.0.4
* https://fengyuanchen.github.io/datepicker
*
* Copyright 2014-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2018-12-20T12:51:42.329Z
* Date: 2019-01-06T02:42:36.188Z
*/

(function (global, factory) {
Expand Down Expand Up @@ -636,7 +636,6 @@
this.showView(VIEWS.MONTHS);
} else {
$target.addClass(options.pickedClass).siblings().removeClass(options.pickedClass);
this.renderYears();
this.hideView();
}

Expand All @@ -656,8 +655,8 @@
}

viewDate.setFullYear(viewYear);
viewDate.setMonth(viewMonth);
viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));
viewDate.setMonth(viewMonth);
this.renderDays();
break;

Expand All @@ -681,16 +680,18 @@

case 'month':
viewMonth = $.inArray($target.text(), options.monthsShort);
date.setMonth(viewMonth);
date.setFullYear(viewYear); // Set date before month to avoid month changing (#195)

date.setDate(getMinDay(viewYear, viewMonth, viewDay));
viewDate.setMonth(viewMonth);
date.setMonth(viewMonth);
viewDate.setFullYear(viewYear);
viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));
viewDate.setMonth(viewMonth);

if (format.hasDay) {
this.showView(VIEWS.DAYS);
} else {
$target.addClass(options.pickedClass).siblings().removeClass(options.pickedClass);
this.renderMonths();
this.hideView();
}

Expand Down
Loading

0 comments on commit 7304085

Please sign in to comment.