Socket
Socket
Sign inDemoInstall

@protonapp/react-mobile-date-picker

Package Overview
Dependencies
263
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.3 to 0.0.4

12

lib/index.js

@@ -69,3 +69,8 @@ 'use strict';

onDateChange(newDate);
var dateObj = new Date(newDate);
if (onDateChange) {
onDateChange(newDate, dateObj);
}
_this.handleClose();

@@ -123,2 +128,3 @@ }, _this.handleChangeInput = function (e) {

var dateObj = (0, _moment2.default)(date);
date = _moment2.default.utc(date).format();

@@ -180,3 +186,3 @@ var borderStyle = customStyles.dateInput && customStyles.dateInput.borderWidth ? 'solid' : 'none';

},
dateObj.format('LLLL')
dateObj.format('llll')
),

@@ -215,3 +221,3 @@ _react2.default.createElement(

DateInput.propTypes = {
date: _propTypes2.default.string,
date: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),
onDateChange: _propTypes2.default.func,

@@ -218,0 +224,0 @@ customStyles: _propTypes2.default.object

{
"name": "@protonapp/react-mobile-date-picker",
"version": "0.0.3",
"version": "0.0.4",
"description": "React (web) implementation of mobile-style date picker",

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

@@ -12,3 +12,6 @@ import React, { Component } from 'react'

static propTypes = {
date: PropTypes.string,
date: PropTypes.oneOfType([
PropTypes.string,
PropTypes.object
]),
onDateChange: PropTypes.func,

@@ -38,3 +41,8 @@ customStyles: PropTypes.object

onDateChange(newDate)
let dateObj = new Date(newDate)
if (onDateChange) {
onDateChange(newDate, dateObj)
}
this.handleClose()

@@ -80,2 +88,3 @@ }

let dateObj = moment(date)
date = moment.utc(date).format()

@@ -139,3 +148,3 @@ let borderStyle = (

>
{dateObj.format('LLLL')}
{dateObj.format('llll')}
</div>

@@ -142,0 +151,0 @@ <ModalWrapper>

@@ -12,10 +12,12 @@ import React, { Component } from 'react'

const NOW = moment.utc().format()
const NOW = new Date()
class Wrapper extends Component {
state = { date: NOW }
handleChange = date => {
handleChange = (dateString, date) => {
this.setState({ date })
this.props.onDateChange(date)
}
render() {

@@ -22,0 +24,0 @@ return (

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc