Comparing version 1.3.4 to 1.3.5
@@ -0,0 +0,0 @@ { |
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
[1.3.5] - | ||
* New option `weekdayStyle` - Weekday display style added. | ||
Possible values are 'long', 'short' or 'narrow'. | ||
Implementation of #91 | ||
[1.3.4] - 2019-03-30 | ||
@@ -103,2 +108,2 @@ * fixed bug #51 | ||
[0.0.1] - 2018-06-15 | ||
* Published on Github | ||
* Published on Github |
@@ -0,0 +0,0 @@ var rangeText = function (start, end) { |
@@ -57,2 +57,3 @@ /** | ||
inline: false, | ||
weekdayStyle: 'short', | ||
dropdowns: { | ||
@@ -104,5 +105,5 @@ years: { | ||
weekdayName = function(opts, day, short) | ||
weekdayName = function(opts, day, weekdayStyle) | ||
{ | ||
return new Date(1970, 0, day).toLocaleString(opts.lang, { weekday: short ? 'short' : 'long' }) | ||
return new Date(1970, 0, day).toLocaleString(opts.lang, { weekday: weekdayStyle || opts.weekdayStyle }); | ||
}, | ||
@@ -265,3 +266,3 @@ | ||
renderMonthsList = function(date, opts) | ||
renderMonthsList = function(date, opts) | ||
{ | ||
@@ -286,3 +287,3 @@ var d = moment(date), | ||
select.className = 'lightpick__select lightpick__select-months'; | ||
// for text align to right | ||
@@ -294,3 +295,3 @@ select.dir = 'rtl'; | ||
} | ||
return select.outerHTML; | ||
@@ -361,3 +362,3 @@ }, | ||
for (var w = opts.firstDay + 4; w < 7 + opts.firstDay + 4; ++w) { | ||
html += '<div class="lightpick__day-of-the-week" title="' + weekdayName(opts, w) + '">' + weekdayName(opts, w, true) + '</div>'; | ||
html += '<div class="lightpick__day-of-the-week" title="' + weekdayName(opts, w, 'long') + '">' + weekdayName(opts, w) + '</div>'; | ||
} | ||
@@ -491,3 +492,3 @@ html += '</div>'; // lightpick__days-of-the-week | ||
opts.parentEl.appendChild(self.el) | ||
} | ||
} | ||
else if (opts.parentEl === 'body' && opts.inline) { | ||
@@ -1221,3 +1222,3 @@ opts.field.parentNode.appendChild(self.el); | ||
this.syncFields(); | ||
if (this._opts.secondField && this._opts.secondField === target && this._opts.endDate) { | ||
@@ -1224,0 +1225,0 @@ this.gotoDate(this._opts.endDate); |
{ | ||
"name": "lightpick", | ||
"version": "1.3.4", | ||
"version": "1.3.5", | ||
"description": "Javascript date range picker - lightweight, no jQuery", | ||
@@ -5,0 +5,0 @@ "main": "lightpick.js", |
@@ -218,2 +218,10 @@ [![npm version](https://badge.fury.io/js/lightpick.svg)](https://www.npmjs.com/package/lightpick) [![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/wakirin/lightpick/blob/master/LICENSE) | ||
### weekdayStyle | ||
- Type: `String` | ||
- Default: `short` | ||
Determines the weekday display style. | ||
Possible values are: `long` (e.g., Thursday), `short` (e.g., Thu), `narrow` (e.g., T). | ||
Two weekdays may have the same narrow style for some locales (e.g. Tuesday's narrow style is also T). | ||
### dropdowns | ||
@@ -220,0 +228,0 @@ - Type: `Object|Boolean` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
124765
1882
353
1