Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lightpick

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lightpick - npm Package Compare versions

Comparing version 1.3.4 to 1.3.5

0

.csscomb.json

@@ -0,0 +0,0 @@ {

7

CHANGELOG.md
# 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) {

17

lightpick.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc