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

react-native-super-timepicker

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

react-native-super-timepicker - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

2

package.json
{
"name": "react-native-super-timepicker",
"version": "1.1.5",
"version": "1.1.6",
"description": "React Native 24-hour super TimePicker for iOS",

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

@@ -11,4 +11,4 @@ # react-native-super-timepicker

- supporting `minHour` and `maxHour` (contribution by [mindmind](https://github.com/mindmind))
- putting a space gap between the number and the label (e.g. "24 mins" instead of "24mins")
- removing deprecated stuff like `componentWillReceiveProps`
- updated dependencies to the latest stuff

@@ -109,21 +109,21 @@ ### Screenshot

| Prop | Type | Description | Default |
| ------------------ | -------- | --------------------------------------------------------------------------- | ------- |
| minHour | number | Minimum of hour | 0 |
| maxHour | number | Maximum of hour | 23 |
| minMinute | number | Minimum of minute | 0 |
| maxMinute | number | Maximum of minute | 59 |
| hourInterval | number | The interval at which hours can be selected. | 1 |
| minuteInterval | number | The interval at which minutes can be selected. | 1 |
| hourUnit | string | Add extra text to hour (e.g. "hrs") | "" |
| hourUnitSingular | string | The first hour's extra text, if not hourUnit (e.g. "1 hr" vs "2 hrs") | "" |
| minuteUnit | string | Add extra text to minute (e.g. "mins") | "" |
| minuteUnitSingular | string | The first minute's extra text, if not minuteUnit (e.g. "1 min" vs "2 mins") | "" |
| selectedHour | string | Default hour | "0" |
| selectedMinute | string | Default minute | "00" |
| itemStyle | object | Item text style | {} |
| textCancel | string | Cancel button text | Cancel |
| textConfirm | string | Confirm button text | Confirm |
| onCancel | function | Event on Cancel button | |
| onConfirm | function | Event on Confirm button | |
| Prop | Type | Description | Default |
| ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| minHour | number | Minimum of hour | 0 |
| maxHour | number | Maximum of hour | 23 |
| minMinute | number | Minimum of minute | 0 |
| maxMinute | number | Maximum of minute | 59 |
| hourInterval | number | The interval at which hours can be selected. | 1 |
| minuteInterval | number | The interval at which minutes can be selected. | 1 |
| hourUnit | string | Add extra text to hour (e.g. "hrs"). Include a space if you want a gap between the number and the text (e.g. " hrs" for "18 hrs") | "" |
| hourUnitSingular | string | The first hour's extra text, if not hourUnit (e.g. "1 hr" vs "2 hrs") | "" |
| minuteUnit | string | Add extra text to minute (e.g. "mins"). Include a space if you want a gap between the number and the text (e.g. " mins" for "4 mins") | "" |
| minuteUnitSingular | string | The first minute's extra text, if not minuteUnit (e.g. "1 min" vs "2 mins") | "" |
| selectedHour | string | Default hour | "0" |
| selectedMinute | string | Default minute | "00" |
| itemStyle | object | Item text style | {} |
| textCancel | string | Cancel button text | Cancel |
| textConfirm | string | Confirm button text | Confirm |
| onCancel | function | Event on Cancel button | |
| onConfirm | function | Event on Confirm button | |

@@ -130,0 +130,0 @@ ## Methods

@@ -36,3 +36,3 @@ import React, { Component } from "react";

const unitLabel = hourUnit
? ` ${i === 1 ? hourUnitSingular || hourUnit : hourUnit}`
? `${i === 1 ? hourUnitSingular || hourUnit : hourUnit}`
: "";

@@ -56,7 +56,6 @@ const item = (

} = this.props;
const interval = maxMinute / minuteInterval;
for (let i = minMinute; i <= maxMinute; i = i + minuteInterval) {
const new_value = i < 10 ? `0${i}` : `${i}`;
const unitLabel = minuteUnit
? ` ${i === 1 ? minuteUnitSingular || minuteUnit : minuteUnit}`
? `${i === 1 ? minuteUnitSingular || minuteUnit : minuteUnit}`
: "";

@@ -63,0 +62,0 @@ const item = (

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