
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
react-native-modern-time-picker
Advanced tools
<table align="right"> <tr> <td></td> </tr> </table>
![]() |
The TimePicker
component is a React Native component that allows selecting values for days, hours, and minutes.
To use the TimePicker component in your project, follow the steps below:
Make sure you have Node.js and npm (or yarn) installed in your development environment.
Open the terminal and navigate to the root directory of your project.
Run the following command to install the component via npm:
npm install react-native-modern-time-picker
or if you're using yarn, run:
yarn add react-native-modern-time-picker
import TimePicker from 'react-native-modern-time-picker'
Now you're ready to start using the TimePicker component in your project!
The TimePicker
component accepts the following props:
minutesValue
(required): Object containing the following properties:
totalValue
(number): The total number of values available for minutes.textValue
(string): The text displayed next to each minute value.initialValue
(optional): The initial value for minutes.hoursValue
(required): Object containing the following properties:
totalValue
(number): The total number of values available for hours.textValue
(string): The text displayed next to each hour value.initialValue
(optional): The initial value for hours.daysValue
(optional): Object containing the following properties:
totalValue
(number): The total number of values available for days.textValue
(string): The text displayed next to each day value.initialValue
(optional): The initial value for days.dividerStyle
(optional): Style applied to the divider between the time values.
textValueStyle
(optional): Style applied to the text displayed next to each time value.
valueSelectedStyle
(optional): Style applied to the selected value.
valueUnselectedStyle
(optional): Style applied to the unselected values.
style
(optional): Additional style applied to the TimePicker
component.
onValuesSelected
(required): Function called when the time values are selected. Receives an object containing the days
, hours
, and minutes
properties, representing the selected values for days, hours, and minutes respectively.
import React, {useState} from 'react';
import {
StyleSheet,
Text,
View,
} from 'react-native';
import TimePicker from './src';
const App = () => {
const [selectedValues, setSelectedValues] = useState({
days: 0,
hours: 0,
minutes: 0,
});
const handleValuesSelected = (values: {
days: number;
hours: number;
minutes: number;
}) => {
setSelectedValues(values);
};
return (
<View style={styles.container}>
<TimePicker
minutesValue={{totalValue: 60, textValue: 'min'}}
hoursValue={{totalValue: 24, textValue: 'hours'}}
daysValue={{totalValue: 99, textValue: 'days', initialValue: 20}}
style={{marginHorizontal: 10}}
dividerStyle={{fontSize: 30, color: '#000'}}
textValueStyle={{fontSize: 15, color: '#000'}}
valueSelectedStyle={{fontSize: 32, marginVertical: -3, color: '#000', opacity: 1}}
valueUnselectedStyle={{fontSize: 20, marginVertical: 0, color: '#000', opacity: 0.5}}
onValuesSelected={handleValuesSelected}
/>
<Text>
Selected Values: {selectedValues.days} days, {selectedValues.hours} hours, {selectedValues.minutes} minutes
</Text>
</View>
);
};
const styles = StyleSheet.create({
container: {
alignItems: 'center',
justifyContent: 'center',
flex: 1,
},
});
export default App;
Contributions are welcome! Here are some ways you can contribute to this project:
To contribute to this project, follow these steps:
Please ensure that your contributions adhere to the project's coding guidelines and follow best practices. Also, make sure to provide a clear description of your changes in the pull request.
Thank you for contributing to this project!
If you find this TimePicker component helpful, I would appreciate it if you could connect with me on LinkedIn and share your experience of using it.
FAQs
<table align="right"> <tr> <td></td> </tr> </table>
The npm package react-native-modern-time-picker receives a total of 112 weekly downloads. As such, react-native-modern-time-picker popularity was classified as not popular.
We found that react-native-modern-time-picker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.