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

react-mobile-datepicker

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-mobile-datepicker - npm Package Compare versions

Comparing version 3.0.8 to 3.0.9

7

CHANGELOG.md

@@ -0,1 +1,8 @@

[3.0.9](../../releases/tag/3.0.9) 2018-04-23 10:48:04
---------------------------------------------------------
- [8508a7e](../../commit/8508a7e) ✨ [feature] add test case for dateSteps
- [34ff8c6](../../commit/34ff8c6) ✨ [feature] Add characteristics of set a time step
[3.0.8](../../releases/tag/3.0.8) 2017-10-15 23:17:08

@@ -2,0 +9,0 @@ ---------------------------------------------------------

6

lib/DatePicker.js

@@ -18,2 +18,3 @@ /**

dateFormat: Array<*>,
dateSteps: Array<*>,
showFormat: string,

@@ -88,3 +89,3 @@ confirmText: string,

render() {
const { min, max, theme, dateFormat, confirmText, cancelText, showFormat, showHeader, customHeader } = this.props;
const { min, max, theme, dateFormat, confirmText, cancelText, showFormat, showHeader, customHeader, dateSteps } = this.props;
const value = this.state.value;

@@ -94,3 +95,3 @@ const themeClassName =

'default' : theme;
return (

@@ -105,2 +106,3 @@ <div

key={index}
step={dateSteps[index] || 1}
value={value}

@@ -107,0 +109,0 @@ min={min}

@@ -48,2 +48,3 @@

format: string,
step: number,
onSelect: Function,

@@ -132,3 +133,3 @@ }

.map((value, index) =>
TimeUtil[`next${typeName}`](date, index - MIDDLE_INDEX));
TimeUtil[`next${typeName}`](date, (index - MIDDLE_INDEX) * this.props.step));
this.setState({ dates });

@@ -145,3 +146,3 @@ }

...dates.slice(1),
TimeUtil[`next${typeName}`](dates[dates.length - 1], 1),
TimeUtil[`next${typeName}`](dates[dates.length - 1], this.props.step),
],

@@ -154,3 +155,3 @@ marginTop: (this.currentIndex - MIDDLE_INDEX) * DATE_HEIGHT,

dates: [
TimeUtil[`next${typeName}`](dates[0], -1),
TimeUtil[`next${typeName}`](dates[0], -this.props.step),
...dates.slice(0, dates.length - 1),

@@ -157,0 +158,0 @@ ],

@@ -52,2 +52,3 @@ import './index.css';

dateFormat: ['YYYY', 'M', 'D'],
dateSteps: [1, 1, 1],
showFormat: 'YYYY/MM/DD',

@@ -54,0 +55,0 @@ confirmText: '完成',

{
"name": "react-mobile-datepicker",
"version": "3.0.8",
"version": "3.0.9",
"description": "一个移动端时间选择器react组件",

@@ -5,0 +5,0 @@ "main": "./dist/react-mobile-datepicker.js",

@@ -130,2 +130,3 @@ # react-mobile-datepicker

| dateFormat | Array | ['YYYY', 'M', 'D'] | according to year, month, day, hour, minute, second format specified display text. E.g ['YYYY年', 'MM月', 'DD日']|
| dateSteps | Array | [1, 1, 1] | set step for each time unit |
|showFormat | String | 'YYYY/MM/DD' | customize the format of the display title |

@@ -132,0 +133,0 @@ | value | Date | new Date() | date value |

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