npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-date-ranges-picker

v2.5.2

Published

This is a fork of react-native-date-ranges a bit more customizable

Downloads

27

Readme

react-native-date-ranges

npm version npm downloads

Getting started

$ npm install react-native-date-ranges --save

alt text

Usage

import DatePicker from 'react-native-date-ranges';

//range picker
<DatePicker
	style={ { width: 350, height: 45 } }
	customStyles = { {
		placeholderText:{ fontSize:20 } // placeHolder style
		headerStyle : {  },			// title container style
		headerMarkTitle : { }, // title mark style 
		headerDateTitle: { }, // title Date style
		contentInput: {}, //content text container style
		contentText: {}, //after selected text Style
	} } // optional 
	centerAlign // optional text will align center or not
	allowFontScaling = {false} // optional
	placeholder={'Apr 27, 2018 → Jul 10, 2018'}
	mode={'range'}
/>

//single picker
<DatePicker
	style={ { width: 350, height: 45 } }
	customStyles = { {
		placeholderText:{ fontSize:20 }, // placeHolder style
		headerStyle : {  },			// title container style
		headerMarkTitle : { }, // title mark style 
		headerDateTitle: { }, // title Date style
		contentInput: {}, //content text container style
		contentText: {}, //after selected text Style
	} } // optional 
	centerAlign // optional text will align center or not
	allowFontScaling = {false} // optional
	placeholder={'Apr 27, 2018'}
	selectedBgColor="black"
	selectedTextColor="blue"
/>


//customButton usage...
export default class NewPicker extends React.Component{
	
	customButton = (onConfirm) => (
		<Button
			onPress={onConfirm}
			style={{ container:{ width:'80%', marginHorizontal:'3%' }, text:{ fontSize: 20 } }}
			primary
			text={'送出'}
		/>
	)

  render(){
    const {
      ...rest
    } = this.props;
    return(
      <DatePicker
        ref = {(ref)=> this.picker = ref}
        {...rest}
        customButton = {this.customButton}
      />
    )
  }
} 

Props

| Prop | Type | Description | :------------ |:---------------| :-----| | placeholder | String | optional. | | customStyles | Object | optional. customize style e.g.({ placeholderText:{}, headerStyle:{} ... }) | | style | Object | Optional. date picker's style | | onConfirm | Function | Optional. call function after click button, that would return a date object {startDate:'', endDate:''} e.g( value=>console.log(value))| | selectedBgColor | String | Optional. custom your selected date background color e.g {"black"} | | selectedTextColor | String | Optional. custom your selected date text color e.g {"black"} | | ButtonStyle | Object | Optional. custom your save button container style | | ButtonTextStyle | Object | Optional. custom your save button Text style | | returnFormat | String | Optional. custom your datetime format e.g.('YYYY/MM/DD') at onConfirm | | headFormat | String | Optional. custom your datetime format showing at headBlock e.g.('YYYY/MM/DD')| | outFormat | String | Optional. custom your datetime format showing at outline touchable filed e.g.('YYYY/MM/DD')| | mode | String | one of ['range', 'single'] , default as single| | customButton | component | Optional (total custom your button component)e.g.(<Button></Button>) | | blockBefore | Bool | optional. default is false, decide blocke date before today or not | | markText | String | optional. default is "選擇日期", you can custom this prop to label text with ur own | | buttonText | String | optional. you can modify default button't label with your own | | blockAfter | Bool | optional. default is false, decide blocke date after today or not | | dateSplitter | String | optional. default is '->', decide custom dateSplitter with String | ....