Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
rmc-calendar
Advanced tools
React Mobile Calendar Component(web and react-native)
Weekly downloads
Readme
React Mobile Calendar Component (web)
npm i
npm start
http://localhost:8000/examples/
online example: http://react-component.github.io/m-calendar/
./node_modules/rc-tools run react-native-init
npm run watch-tsc
react-native start
react-native run-ios
import React, { Component } from 'react';
import { Calendar } from 'rmc-calendar';
import 'rmc-calendar/assets/index.css';
class App extends Component {
constructor(props) {
super(props);
this.state = {
visible: false,
};
}
setVisiable = () => {
this.setState({
visible: !this.state.visible,
});
}
render() {
return (
<div className="App">
<Calendar
visible={this.state.visible}
onCancel={this.setVisiable}
onConfirm={this.setVisiable}
/>
</div>
);
}
}
export default App;
interface PropsType {
/** enter direction,default: vertical */
enterDirection?: 'horizontal' | 'vertical';
/** locale */
locale?: GlobalModels.Locale;
onCancel?: () => void;
onConfirm?: (startDateTime?: Date, endDateTime?: Date) => void;
/** choose time,default: false */
pickTime?: boolean;
/** (web only) prefix class,default: rmc-calendar */
prefixCls?: string;
/** shortcut render, need showShortcut: true */
renderShortcut?: (select: (startDate?: Date, endDate?: Date) => void) => React.ReactNode;
/** show header, default: true */
showHeader?: boolean;
/** show shortcut, default: false */
showShortcut?: boolean;
/** header title, default: {locale.title} */
title?: string;
/** select type, default: range,one: one-day, range: range */
type?: 'one' | 'range';
/** visible, default: false */
visible?: boolean;
// DatePicker Component
/** default date for show, default: today */
defaultDate?: Date;
/** extra info of date */
getDateExtra?: (date: Date) => DateModels.ExtraData;
/** infinite scroll, default: true */
infinite?: boolean;
/** infinite scroll optimization, default: false */
infiniteOpt?: boolean;
/** inital generate months, default: 6 */
initalMonths?: number;
/** max date */
maxDate?: Date;
/** min date */
minDate?: Date;
/** select range has disable date */
onSelectHasDisableDate?: (date: Date[]) => void;
// TimePicker Component
/** inital time of TimePicker */
defaultTimeValue?: Date;
}
export default interface PropsType {
/** default date for show, default: today */
defaultDate?: Date;
/** select value of start date */
startDate?: Date;
/** select value of end date */
endDate?: Date;
/** extra info of date */
getDateExtra?: (date: Date) => Models.ExtraData;
/** infinite scroll, default: true */
infinite?: boolean;
/** infinite scroll optimization, default: false */
infiniteOpt?: boolean;
/** inital generate months, default: 6 */
initalMonths?: number;
/** locale */
locale?: GlobalModels.Locale;
/** max date */
maxDate?: Date;
/** min date */
minDate?: Date;
/** callback when click the cell of date */
onCellClick?: (date: Date) => void;
/** select range has disable date */
onSelectHasDisableDate?: (date: Date[]) => void;
/** (web only) prefix class */
prefixCls?: string;
/** select type, default: range,one: one-day, range: range */
type?: 'one' | 'range';
}
npm test
npm run chrome-test
npm run coverage
open coverage/ dir
rmc-calendar is released under the MIT license.
FAQs
React Mobile Calendar Component(web and react-native)
The npm package rmc-calendar receives a total of 13,055 weekly downloads. As such, rmc-calendar popularity was classified as popular.
We found that rmc-calendar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Security News
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.