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.9
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuanchen committed Sep 21, 2019
1 parent 0fe5e6c commit 0da4242
Show file tree
Hide file tree
Showing 14 changed files with 1,515 additions and 763 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.9 (Sep 21, 2019)

- Fix the issue of converting `31/10/2019` to `01/10/2019` when the current month only has 30 days (#222).

Expand Down
31 changes: 20 additions & 11 deletions dist/datepicker.common.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Datepicker v1.0.8
* Datepicker v1.0.9
* https://fengyuanchen.github.io/datepicker
*
* Copyright 2014-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-06-23T08:07:40.545Z
* Date: 2019-09-21T06:57:34.100Z
*/

'use strict';
Expand Down Expand Up @@ -508,27 +508,36 @@ var methods = {
}

if (parts.length === format.parts.length) {
// Set year and month first
$.each(parts, function (i, part) {
var value = parseInt(part, 10);

switch (format.parts[i]) {
case 'dd':
case 'd':
date.setDate(value);
case 'yy':
date.setFullYear(2000 + value);
break;

case 'yyyy':
// Converts 2-digit year to 2000+
date.setFullYear(part.length === 2 ? 2000 + value : value);
break;

case 'mm':
case 'm':
date.setMonth(value - 1);
break;

case 'yy':
date.setFullYear(2000 + value);
break;
default:
}
}); // Set day in the last to avoid converting `31/10/2019` to `01/10/2019`

case 'yyyy':
// Converts 2-digit year to 2000+
date.setFullYear(part.length === 2 ? 2000 + value : value);
$.each(parts, function (i, part) {
var value = parseInt(part, 10);

switch (format.parts[i]) {
case 'dd':
case 'd':
date.setDate(value);
break;

default:
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.8
* Datepicker v1.0.9
* https://fengyuanchen.github.io/datepicker
*
* Copyright 2014-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-06-23T08:07:37.208Z
* Date: 2019-09-21T06:57:30.334Z
*/

.datepicker-container {
Expand Down
31 changes: 20 additions & 11 deletions dist/datepicker.esm.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Datepicker v1.0.8
* Datepicker v1.0.9
* https://fengyuanchen.github.io/datepicker
*
* Copyright 2014-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-06-23T08:07:40.545Z
* Date: 2019-09-21T06:57:34.100Z
*/

import $ from 'jquery';
Expand Down Expand Up @@ -504,27 +504,36 @@ var methods = {
}

if (parts.length === format.parts.length) {
// Set year and month first
$.each(parts, function (i, part) {
var value = parseInt(part, 10);

switch (format.parts[i]) {
case 'dd':
case 'd':
date.setDate(value);
case 'yy':
date.setFullYear(2000 + value);
break;

case 'yyyy':
// Converts 2-digit year to 2000+
date.setFullYear(part.length === 2 ? 2000 + value : value);
break;

case 'mm':
case 'm':
date.setMonth(value - 1);
break;

case 'yy':
date.setFullYear(2000 + value);
break;
default:
}
}); // Set day in the last to avoid converting `31/10/2019` to `01/10/2019`

case 'yyyy':
// Converts 2-digit year to 2000+
date.setFullYear(part.length === 2 ? 2000 + value : value);
$.each(parts, function (i, part) {
var value = parseInt(part, 10);

switch (format.parts[i]) {
case 'dd':
case 'd':
date.setDate(value);
break;

default:
Expand Down
31 changes: 20 additions & 11 deletions dist/datepicker.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Datepicker v1.0.8
* Datepicker v1.0.9
* https://fengyuanchen.github.io/datepicker
*
* Copyright 2014-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-06-23T08:07:40.545Z
* Date: 2019-09-21T06:57:34.100Z
*/

(function (global, factory) {
Expand Down Expand Up @@ -510,27 +510,36 @@
}

if (parts.length === format.parts.length) {
// Set year and month first
$.each(parts, function (i, part) {
var value = parseInt(part, 10);

switch (format.parts[i]) {
case 'dd':
case 'd':
date.setDate(value);
case 'yy':
date.setFullYear(2000 + value);
break;

case 'yyyy':
// Converts 2-digit year to 2000+
date.setFullYear(part.length === 2 ? 2000 + value : value);
break;

case 'mm':
case 'm':
date.setMonth(value - 1);
break;

case 'yy':
date.setFullYear(2000 + value);
break;
default:
}
}); // Set day in the last to avoid converting `31/10/2019` to `01/10/2019`

case 'yyyy':
// Converts 2-digit year to 2000+
date.setFullYear(part.length === 2 ? 2000 + value : value);
$.each(parts, function (i, part) {
var value = parseInt(part, 10);

switch (format.parts[i]) {
case 'dd':
case 'd':
date.setDate(value);
break;

default:
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.8
* Datepicker v1.0.9
* https://fengyuanchen.github.io/datepicker
*
* Copyright 2014-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-06-23T08:07:37.208Z
* Date: 2019-09-21T06:57:30.334Z
*/

.datepicker-container {
Expand Down
10 changes: 7 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="description" content="A simple jQuery datepicker plugin.">
<meta name="author" content="Chen Fengyuan">
<title>Datepicker</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.11.1/css/all.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="css/datepicker.css">
<link rel="stylesheet" href="css/main.css">
Expand Down Expand Up @@ -62,7 +62,7 @@
<div class="container">
<div class="row">
<div class="col-md">
<h1>Datepicker <small class="h6">v1.0.8</small></h1>
<h1>Datepicker <small class="h6">v1.0.9</small></h1>
<p class="lead">A simple jQuery datepicker plugin.</p>
</div>
<div class="col-md">
Expand All @@ -82,7 +82,7 @@ <h1 class="page-header">Overview</h1>
<h3 class="page-header">Demo</h3>
<div class="docs-datepicker">
<div class="input-group">
<input type="text" class="form-control docs-date" name="date" placeholder="Pick a date">
<input type="text" class="form-control docs-date" name="date" placeholder="Pick a date" autocomplete="off">
<div class="input-group-append">
<button type="button" class="btn btn-outline-secondary docs-datepicker-trigger" disabled>
<i class="fa fa-calendar" aria-hidden="true"></i>
Expand Down Expand Up @@ -124,6 +124,7 @@ <h3 class="page-header">Options</h3>
<span class="input-group-text" id="option-language">language</span>
</div>
<select class="form-control" id="option-language" name="language">
<option value="ar-IQ">ar-IQ</option>
<option value="ca-ES">ca-ES</option>
<option value="cs-CZ">cs-CZ</option>
<option value="da-DK">da-DK</option>
Expand Down Expand Up @@ -151,6 +152,7 @@ <h3 class="page-header">Options</h3>
<option value="si-LK">si-LK</option>
<option value="sk-SK">sk-SK</option>
<option value="sv-SE">sv-SE</option>
<option value="ta-TA">ta-TA</option>
<option value="th-TH">th-TH</option>
<option value="tr-TR">tr-TR</option>
<option value="ug-CN">ug-CN</option>
Expand Down Expand Up @@ -325,6 +327,7 @@ <h3 class="page-header">Methods</h3>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js"></script>
<script src="https://fengyuanchen.github.io/shared/google-analytics.js"></script>
<script src="js/datepicker.js"></script>
<script src="js/datepicker.ar-IQ.js"></script>
<script src="js/datepicker.ca-ES.js"></script>
<script src="js/datepicker.cs-CZ.js"></script>
<script src="js/datepicker.da-DK.js"></script>
Expand Down Expand Up @@ -352,6 +355,7 @@ <h3 class="page-header">Methods</h3>
<script src="js/datepicker.si-LK.js"></script>
<script src="js/datepicker.sk-SK.js"></script>
<script src="js/datepicker.sv-SE.js"></script>
<script src="js/datepicker.ta-TA.js"></script>
<script src="js/datepicker.th-TH.js"></script>
<script src="js/datepicker.tr-TR.js"></script>
<script src="js/datepicker.ug-CN.js"></script>
Expand Down
17 changes: 17 additions & 0 deletions docs/js/datepicker.ar-IQ.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
(factory(global.jQuery));
}(this, (function ($) {
'use strict';

$.fn.datepicker.languages['ar-IQ'] = {
format: 'dd/mm/yyyy',
days: ['الأحد', 'الأثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
daysShort: ['أحد', 'أثنين', 'ثلاثاء', 'اربعاء', 'خميس', 'جمعة', 'سبت'],
daysMin: ['أ', 'ث', 'ث', 'أ', 'خ', 'ج', 'س'],
weekStart: 1,
months: ['كانون الثاني', 'شباط', 'اذار', 'نيسان', 'ايار', 'حزيران', 'تموز', 'آب', 'ايلول', 'تشرين الاول', 'تشرين الثاني', 'كانون الاول'],
monthsShort: ['كانون ٢', 'شباط', 'اذار', 'نيسان', 'ايار', 'حزيران', 'تموز', 'آب', 'ايلول', 'تشرين ١', 'تشرين ٢', 'كانون ١']
};
})));
31 changes: 20 additions & 11 deletions docs/js/datepicker.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Datepicker v1.0.8
* Datepicker v1.0.9
* https://fengyuanchen.github.io/datepicker
*
* Copyright 2014-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-06-23T08:07:40.545Z
* Date: 2019-09-21T06:57:34.100Z
*/

(function (global, factory) {
Expand Down Expand Up @@ -510,27 +510,36 @@
}

if (parts.length === format.parts.length) {
// Set year and month first
$.each(parts, function (i, part) {
var value = parseInt(part, 10);

switch (format.parts[i]) {
case 'dd':
case 'd':
date.setDate(value);
case 'yy':
date.setFullYear(2000 + value);
break;

case 'yyyy':
// Converts 2-digit year to 2000+
date.setFullYear(part.length === 2 ? 2000 + value : value);
break;

case 'mm':
case 'm':
date.setMonth(value - 1);
break;

case 'yy':
date.setFullYear(2000 + value);
break;
default:
}
}); // Set day in the last to avoid converting `31/10/2019` to `01/10/2019`

case 'yyyy':
// Converts 2-digit year to 2000+
date.setFullYear(part.length === 2 ? 2000 + value : value);
$.each(parts, function (i, part) {
var value = parseInt(part, 10);

switch (format.parts[i]) {
case 'dd':
case 'd':
date.setDate(value);
break;

default:
Expand Down
17 changes: 17 additions & 0 deletions docs/js/datepicker.ta-TA.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
(factory(global.jQuery));
}(this, (function ($) {
'use strict';

$.fn.datepicker.languages['ta-TA'] = {
format: 'dd/mm/yyyy',
days: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'],
daysShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'],
daysMin: ['ஞா','தி','செ','பு','வி','வெ','ச'],
weekStart: 1,
months: ['ஜனவரி','பிப்ரவரி','மார்ச்','ஏப்ரல்','மே','ஜூன்','ஜூலை','ஆகஸ்ட்','செப்டெம்பர்','அக்டோபர்','நவம்பர்','டிசம்பர்'],
monthsShort: ['ஜன', 'பிப்', 'மார்', 'ஏப்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆக', 'செப்', 'அக்', 'நவ', 'டிச']
};
})));
Loading

0 comments on commit 0da4242

Please sign in to comment.