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

m-datetime-picker

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

m-datetime-picker - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

28

index.js

@@ -43,3 +43,3 @@ 'use strict';

for (var i = min; i <= max; i++) {
arr.push(i < 10 ? '0' + i : i);
arr.push(i < 10 ? '0' + i : '' + i);
}

@@ -143,5 +143,9 @@ return arr;

_this.secondsIndex = _this.fmtAry.indexOf('s');
_this.minDate = new Date(props.minDate + 'T16:00:00');
_this.maxDate = new Date(props.maxDate + 'T15:59:59');
var minDateArr = props.minDate.split('-');
_this.minDate = new Date(+minDateArr[0], minDateArr[1] - 1, +minDateArr[2]);
var maxDateArr = props.maxDate.split('-');
_this.maxDate = new Date(+maxDateArr[0], maxDateArr[1] - 1, +maxDateArr[2]);
_this.options = {

@@ -220,2 +224,20 @@ defaultValue: _this.getDefaultValue.bind(_this)(),

}
// check minDate , maxDate
var minDateArr = picker.props.minDate.split('-');
var minDate = new Date(+minDateArr[0], minDateArr[1] - 1, +minDateArr[2]);
var maxDateArr = picker.props.maxDate.split('-');
var maxDate = new Date(+maxDateArr[0], maxDateArr[1] - 1, +maxDateArr[2]);
var valuesDate = new Date(+values[0], values[1] - 1, +values[2])
if (+valuesDate < +minDate) {
month = minDateArr[1]
currentValue = minDateArr[2];
cols[this.monthIndex].setValue(month);
} else if (+valuesDate > +maxDate) {
month = maxDateArr[1]
currentValue = maxDateArr[2];
cols[this.monthIndex].setValue(month);
}
cols[this.dateIndex].setValue(currentValue);

@@ -222,0 +244,0 @@ }

2

package.json
{
"name": "m-datetime-picker",
"version": "1.0.3",
"version": "1.0.4",
"description": "m-datetime-picker 日期时间选择器,基于m-picker扩展来",

@@ -5,0 +5,0 @@ "main": "index.js",

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