New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@planet/ui

Package Overview
Dependencies
Maintainers
10
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@planet/ui - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

21

lib/date-range-picker.js

@@ -27,2 +27,13 @@ 'use strict';

/* Calling new Date('yyyy-mm-dd') can result in the day being one day behind,
depending on your location. This function fixes it so that the day is always
consistent with the string.
https://stackoverflow.com/questions/7556591/javascript-date-object-always-one-day-off
*/
function normalizedDateObj(dateStr) {
var newDate = dateStr ? new Date(dateStr) : new Date();
return new Date(newDate.getTime() - newDate.getTimezoneOffset() * -60000);
}
// There's a bug in this rule. It's unclear why it thinks there are multiple

@@ -44,5 +55,5 @@ // components in this file...

// Used for determining the left-most visible month
currentMonth: this.props.startDate ? new Date(this.props.startDate) : new Date(),
from: this.props.startDate ? new Date(this.props.startDate) : null,
to: this.props.endDate ? new Date(this.props.endDate) : null,
currentMonth: this.props.startDate ? normalizedDateObj(this.props.startDate) : normalizedDateObj(),
from: this.props.startDate ? normalizedDateObj(this.props.startDate) : null,
to: this.props.endDate ? normalizedDateObj(this.props.endDate) : null,
isSelecting: false

@@ -64,3 +75,3 @@ };

if (nextProps.startDate) {
var startDate = new Date(nextProps.startDate);
var startDate = normalizedDateObj(nextProps.startDate);
nextState.from = startDate;

@@ -74,3 +85,3 @@ nextState.currentMonth = startDate;

if (nextProps.endDate) {
var endDate = new Date(nextProps.endDate);
var endDate = normalizedDateObj(nextProps.endDate);
nextState.to = endDate;

@@ -77,0 +88,0 @@ nextState.to = endDate;

{
"name": "@planet/ui",
"version": "1.1.3",
"version": "1.1.4",
"description": "Planet UI components built with React",

@@ -5,0 +5,0 @@ "author": "Planet",

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