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

react-mobile-datepicker

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-mobile-datepicker

一个移动端时间选择器react组件

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.8K
decreased by-25.85%
Maintainers
1
Weekly downloads
 
Created
Source

react-mobile-datepicker

Travis npm package Coveralls

一个移动端时间选择器react组件

安装

Using npm:

$ npm install react-mobile-datepicker --save

然后,使用模块加载工具流,支持common.js或ES2015模块,例如webpack

// Using an ES6 transpiler like Babel
import DatePicker from 'react-mobile-datepicker';
import 'react-mobile-datepicker/dist/mobile-datepicker.css'; // Make sure to import the default stylesheet

// Not using an ES6 transpiler
var DatePicker = require('react-mobile-datepicker');
require('react-mobile-datepicker/dist/mobile-datepicker.css');

使用

例子

import React, { Component } from 'react';
import { render } from 'react-dom';
import DatePicker from 'mobile-datepicker';
import 'react-mobile-datepicker/dist/mobile-datepicker.css'; // only needs to be imported once

// Render the Calendar
var today = new Date();
var minDate = Number(new Date()) - (24*60*60*1000) * 7; // One week before today



render(
	<DatePicker
		startDate={today}
		minDate={minDate}
		onSelect={(time) => { console.log(time); }} />,
  document.getElementById('root')
);

Prop Types

PropertyTypeDefaultDescription
btnColorString#fff完成按钮颜色
dateColorString#fff日期文字颜色
layerBackgroundString#ffa70b背景颜色
dateDatenew Date()初始日期
minDateDate前一周最小日期
maxDateDatenew Date()最大日期
onSelectFunction() => {}点击完成后的回调函数, Date对象作为参数

Changelog

v1.0.3 - Thu, 23 Jun 2016 13:22:13 GMT

  • 5a93fe9 [changed] 更新了READEME

Keywords

FAQs

Package last updated on 04 Jul 2016

Did you know?

Socket

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.

Install

Related posts

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