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

anima-datetimepicker

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anima-datetimepicker - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

HISTORY.md

@@ -5,2 +5,6 @@ # History

## 1.0.2
`improved` anima-basescroller 改成 anima-scroller。
## 1.0.1

@@ -7,0 +11,0 @@

@@ -0,1 +1,2 @@

require('./src/datetimepicker.css');
module.exports = require('./src/datetimepicker');

4

package.json
{
"name": "anima-datetimepicker",
"version": "1.0.1",
"version": "1.0.2",
"description": "日期时间选择器",

@@ -27,3 +27,3 @@ "keywords": [],

"dependencies": {
"anima-basescroller": "~1.2.0"
"anima-scroller": "~1.0.2"
},

@@ -30,0 +30,0 @@ "engines": {

@@ -1,4 +0,3 @@

require('./datetimepicker.css');
var BaseScroller = require('anima-basescroller');
var Scroller = require('anima-scroller');

@@ -144,9 +143,7 @@ var MASK_TEMPLATE = '<div class="dp-mask"></div>';

function renderScroller(el, data, value, fn) {
var scroller = new BaseScroller({
itemNumber : 7,
var scroller = new Scroller(el, {
data : data,
selectedCallback : fn
defaultValue : value,
onSelect : fn
});
scroller.appendTo(el);
scroller.select(value);
return scroller;

@@ -265,7 +262,10 @@ }

if (self.container) {
each(TYPE_MAP, function(type) {
self[type + 'Scroller'] && self[type + 'Scroller'].select(newValueMap[type]);
self[type + 'Scroller'] && self[type + 'Scroller'].select(newValueMap[type], false);
});
self.container.style.display = 'block';
} else {
var container = self.container = toElement(config.template);

@@ -275,2 +275,4 @@

self.container.style.display = 'block';
container.addEventListener('touchstart', function(e) {

@@ -298,10 +300,10 @@ e.preventDefault();

if (type == 'year') {
var currentMonth = self.monthScroller ? self.monthScroller.getValue() : config.currentMonth;
var currentMonth = self.monthScroller ? self.monthScroller.value : config.currentMonth;
if (currentMonth == 2) {
var currentDay = self.dayScroller.getValue();
var currentDay = self.dayScroller.value;
self._setDayScroller(currentValue, currentMonth, currentDay);
}
} else if (type == 'month') {
var currentYear = self.yearScroller ? self.yearScroller.getValue() : config.currentYear;
var currentDay = self.dayScroller.getValue();
var currentYear = self.yearScroller ? self.yearScroller.value : config.currentYear;
var currentDay = self.dayScroller.value;
self._setDayScroller(currentYear, currentValue, currentDay);

@@ -323,3 +325,2 @@ }

self.container.style.display = 'block';
showMask();

@@ -393,3 +394,3 @@ config.onShow.call(self);

select : function(type, value) {
this[type + 'Scroller'].selectThenCallback(value);
this[type + 'Scroller'].select(value, false);
},

@@ -414,3 +415,3 @@

if (scroller) {
var val = scroller.getValue();
var val = scroller.value;
if (expr1) {

@@ -417,0 +418,0 @@ value = value.replace(new RegExp(expr1, 'g'), addZero(val));

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