A simple calendar component for React based applications.
A component that is easy to start using, yet flexible when you need customization.
You can find the component's online demo here.
npm install simple-react-calendar
yarn add simple-react-calendar
import React, { Component } from 'react'
import SimpleReactCalendar from 'simple-react-calendar'
class MyApp extends Component {
render() {
return <SimpleReactCalendar activeMonth={new Date()} />
}
}
All of the properties are optional, just rendering <Calendar />
will already give you a working calendar component.
datePropType
- number
, string
or instanceOf(Date)
You can easily override any rendered part of the calendar by providing the proper render function as a Prop.
Render Prop name | Default usage | Default Render Prop Component |
---|---|---|
renderDay |
(props) => <Day {...props} /> |
RenderPropsComponents/Day/Day.tsx |
renderDayOfWeek |
(props) => <DayOfWeek {...props} /> |
RenderPropsComponents/DayOfWeek/DayOfWeek.tsx |
renderNotice |
(props) => <Notice {...props} /> |
RenderPropsComponents/Notice/Notice.tsx |
You can easily override any helper methods, all of them exposed as pure functions.
Helper function | Default function |
---|---|
getDayFormatted |
getDayFormatted |
getISODate |
getISODate |
getNoticeContent |
getNoticeContent |
simple-react-calendar
follows BEM-like class naming approach and usessingle block name as a prefix. Default block class name is calendar
, soelements will have names like calendar-day
, calendar-month
etc.
Block class name can be overrided with blockClassName
prop (see above).
Description | Default Class Name | Modifier Class Names |
---|---|---|
Calendar (root element) | .calendar |
|
Calendar month header | .calendar-month_header |
|
Calendar month header title (month name) | .calendar-month_header_title |
|
Calendar header button (month switcher) | .calendar-header_button |
|
Calendar week header (week days) | .calendar-days_of_week |
|
Calendar week header day (week day) | .calendar-days_of_week_day |
|
Calendar month (weeks wrapper element) | .calendar-month |
|
Calendar week (days wrapper element) | .calendar-week |
|
Calendar day | .calendar-day |
|
Calendar notice (notice element) | .calendar-notice |
Fork this repository and clone your version of the repository
Install dependencies
yarn
Start example server locally
yarn start
You now have examples running on http://localhost:9000
Fork this repository and clone your version of the repository
Install dependencies
yarn
Start example server locally
yarn storybook
You now have examples running on http://localhost:6006
1.Toast: https://github.com/magicismight/react-native-root-toast 2.图标的使用: https://github.com/oblador/react-native-vector-icons 3.选择照片: https://github.com/lwansbrough/react-native-camera 4.二级菜单: https:
React Native 项目常用第三方组件汇总: https://github.com/KartikTalwar/rn-grid-view gridView的使用 react-native-animatable 动画 react-native-carousel 轮播 react-native-countdown 倒计时 react-native-device-info 设备信息 react-n
1. 路由器 Router a)BrowserRouter 返回目录 使用 HTML5 的 history API (pushState, replaceState 和 popstate 事件) 来保持 UI 与 URL 同步的<router> import { BrowserRouter } from 'react-router-dom' <BrowserRouter basename={
react-native-uploader //文件上传 https://github.com/aroth/react-native-uploader jpush-react-native //官方版本 https://github.com/jpush/jpush-react-native react-native-jpush 由 React Native 中文网开发维护。 https://git
本文出处: http://blog.csdn.net/chichengjunma/article/details/52920137 React Native 项目常用第三方组件汇总: react-native-animatable 动画 react-native-carousel 轮播 react-native-countdown 倒计时 react-native-device-i
react 国际化 by Preethi Kasireddy 通过Preethi Kasireddy React的国际化 (Internationalization in React) Internationalization is a big problem. If you want your application to make a worldwide impact, you have to
React-native-animatable 动画 react-native-carousel 轮播 react-native-countdown 倒计时 react-native-device-info 设备信息 react-native-fileupload 文件上传 react-native-icons 图标 react-native-image-picker 图片选择器 react-na
React 学习与实践资料索引 Overview: 概览 Principle: 设计理念 Case Study: 案例 Book: 书籍 Course & Conf: 视频教程与会议 Resource: 其他资源集锦 Tutorial: 入门教程 Concept: 概念 Coding: 基础编码 Component: 组件开发 Syntax: 语法 Props State Context DOM
React Native 项目常用第三方组件汇总: React-native-uploader //文件上传 https://github.com/aroth/react-native-uploader 0.gif jpush-react-native //官方版本 https://github.com/jpush/jpush-react-native react-native-jpush 由 R
近期困扰于SPA在ios微信调用分享SDK失败的问题, 目前采用拿掉react-router路由,采用原始location.href的方式跳转,临时解决问题... 坑终究是坑,不填不足以平民愤... 这时候才发现react-router的升级至4.x,相比之前,多有不同之处,废话不多说,先搞个API整体的摸索一番。 对以上问题感兴趣的,欢迎交流 ^_^ 重点分割线 具体栗子参见
React Native常用第三方组件汇总 React Native 项目常用第三方组件汇总: react-native-animatable 动画 react-native-carousel 轮播 react-native-countdown 倒计时 react-native-device-info 设备信息 react-native-fileupload 文件上传 re
MUI - The React UI library for faster and easier web development. React Table - Lightweight and extensible data tables for React. React Flatpickr - Useful library used to select date. React ChartJS 2
reactjs 网站建设中常用的组件,基本涵盖了项目日常所需 griddle-react react-bootstrap react-cropper core-js Material UI superagent restful-error-es6 browserify react-select-popover 标签选择 react-infinite-scroll 无限滚动 semantic-ui
react-native-linear-gradient 颜色渐变处理 react-native-login 视频界面登录 react-native-keyboard-aware-scroll-view 键盘显示处理 react-native-popup-dialog 弹窗 react-native-dropdownalert 一种非常漂亮的alert弹窗方式,从状态栏往下弹窗; react-n
simple-react-full-stack This is a boilerplate to build a full stack web application using React, Node.js, Express and Webpack. It is also configured with webpack-dev-server, eslint, prettier and babel
Simple Universal React Redux The simplest possible Async Universal React & Redux boilerplate. This repo is an attempt to make the simplest server-side rendered (universal) async React Redux app. Boile
react-native-simple-markdown A component for rendering Markdown in React Native with native components, working with both iOS & Android. Pull requests are welcome! �� �� Getting started yarn add react
Simple Calendar A simple calendar with events and a customizable widget. A simple calendar with optional CalDAV synchronization. You can easily create recurring events and setup reminders, it can also
To install Tengine, just follow these three steps: $ ./configure $ make # make install By default, it will be installed to /usr/local/nginx. You can use the '--prefix' option to specify the root dire
插入 // 单条插入 User user=new User(); // 省略entity属性赋值... ... elasticsearchTemplate.save(user); // 批量插入 LinkedList<User> users= new LinkedList<User>(); // 省略entity属性赋值... ... elasticsearchTemplate.save(user