All Projects → arthurdenner → react-semantic-ui-datepickers

arthurdenner / react-semantic-ui-datepickers

Licence: MIT license
Datepickers built with Semantic UI for React and Dayzed.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to react-semantic-ui-datepickers

chakra-dayzed-datepicker
Chakra UI + Dayzed = datepicker
Stars: ✭ 44 (-49.43%)
Mutual labels:  datepicker, dayzed
datepickertimeline
Linear date picker for Jetpack compose
Stars: ✭ 43 (-50.57%)
Mutual labels:  datepicker
Heyui
🎉UI Toolkit for Web, Vue2.0 http://www.heyui.top
Stars: ✭ 2,373 (+2627.59%)
Mutual labels:  datepicker
Didatepicker
Yet another datepicker for iOS
Stars: ✭ 242 (+178.16%)
Mutual labels:  datepicker
Datepicker
Get a date with JavaScript! A datepicker with no dependencies.
Stars: ✭ 212 (+143.68%)
Mutual labels:  datepicker
React Datepicker
An easily internationalizable, accessible, mobile-friendly datepicker library for the web, build with styled-components.
Stars: ✭ 252 (+189.66%)
Mutual labels:  datepicker
Hotel Datepicker
Date range picker for hotels
Stars: ✭ 202 (+132.18%)
Mutual labels:  datepicker
react-modern-datepicker
A modern date picker for react library
Stars: ✭ 19 (-78.16%)
Mutual labels:  datepicker
semantic-ui-react-todos
The ReactJS/Redux Todo List Example with Semantic UI Components
Stars: ✭ 96 (+10.34%)
Mutual labels:  semantic-ui-react
Semantic Ui Calendar React
Datepicker react component based on semantic-ui-react components
Stars: ✭ 239 (+174.71%)
Mutual labels:  datepicker
Flatpickr
lightweight, powerful javascript datetimepicker with no dependencies
Stars: ✭ 14,575 (+16652.87%)
Mutual labels:  datepicker
Vue Bootstrap Datetimepicker
Vue.js component for eonasdan bootstrap datetimepicker
Stars: ✭ 221 (+154.02%)
Mutual labels:  datepicker
Vue Datepicker Ui
Datepicker Component For Vue
Stars: ✭ 252 (+189.66%)
Mutual labels:  datepicker
Persian Date Picker Dialog
Persian Date Picker Dialog for Android
Stars: ✭ 205 (+135.63%)
Mutual labels:  datepicker
nepali-date-picker
Nepali Date Picker jQuery Plugin 🇳🇵
Stars: ✭ 71 (-18.39%)
Mutual labels:  datepicker
Lightpick
(deprecated) Check out the new date picker Litepicker
Stars: ✭ 204 (+134.48%)
Mutual labels:  datepicker
Calendarview
A highly customizable calendar library for Android, powered by RecyclerView.
Stars: ✭ 2,862 (+3189.66%)
Mutual labels:  datepicker
Adm Datetimepicker
Pure AngularJs dateTimePicker
Stars: ✭ 244 (+180.46%)
Mutual labels:  datepicker
fTboilerplate-SemanticUI
boilerplate meteor react react router V4 semantic ui
Stars: ✭ 13 (-85.06%)
Mutual labels:  semantic-ui-react
monthyear-picker
Month and Year picker library for Android
Stars: ✭ 34 (-60.92%)
Mutual labels:  datepicker

📆 react-semantic-ui-datepickers

Datepickers built with Semantic UI for React and Dayzed

version MIT License All Contributors

Overview

Semantic UI for React doesn't have a datepicker and the best solutions don't fit with its design. This library tries to solve this problem providing a component that can act as a basic or range datepicker.

It supports most props of Form.Input and Dayzed components. Check the supported props section for more information.

Table of Contents

Installation

npm install --save react-semantic-ui-datepickers
yarn add react-semantic-ui-datepickers

This package also depends on react and semantic-ui-react. Please make sure you have them installed as well.

Usage

import React, { useState } from 'react';
import SemanticDatepicker from 'react-semantic-ui-datepickers';
import 'react-semantic-ui-datepickers/dist/react-semantic-ui-datepickers.css';

const AppWithBasic = () => {
  const [currentDate, setNewDate] = useState(null);
  const onChange = (event, data) => setNewDate(data.value);

  return <SemanticDatepicker onChange={onChange} />;
};

const AppWithRangeAndInPortuguese = () => {
  const [currentRange, setNewRange] = useState([]);
  const onChange = (event, data) => setNewRange(data.value);

  return <SemanticDatepicker locale="pt-BR" onChange={onChange} type="range" />;
};

More examples here.

Supported Props

Own Props

property type required default description
allowOnlyNumbers boolean no true Allows the user enter only numbers
autoComplete string no -- Specifies if the input should have autocomplete enabled
clearIcon SemanticICONS | React.ReactElement no 'close' An icon from semantic-ui-react or a custom component. The custom component will get two props: data-testid and onClick.
clearOnSameDateClick boolean no true Controls whether the datepicker's state resets if the same date is selected in succession.
clearable boolean no true Allows the user to clear the value
datePickerOnly boolean no false Allows the date to be selected only via the date picker and disables the text input
filterDate function no (date) => true Function that receives each date and returns a boolean to indicate whether it is enabled or not
format string no 'YYYY-MM-DD' Specifies how to format the date using the date-fns' format
formatOptions options no -- Specifies the options to format the date using the date-fns' format
icon SemanticICONS | React.ReactElement no 'calendar' An icon from semantic-ui-react or a custom component. The custom component will get two props: data-testid and onClick.
inline boolean no false Uses an inline variant, without the input and the features related to it, e.g. clearable datepicker
keepOpenOnClear boolean no false Keeps the datepicker open (or opens it if it's closed) when the clear icon is clicked
keepOpenOnSelect boolean no false Keeps the datepicker open when a date is selected
locale string no 'en-US' Filename of the locale to be used. PS: Feel free to submit PR's with more locales!
onBlur function no (event) => {} Callback fired when the input loses focus
onFocus function no (event) => {} Callback fired when the input gets focused focus
onChange function no (event, data) => {} Callback fired when the value changes
pointing string no 'left' Location to render the component around input. Available options: 'left', 'right', 'top left', 'top right'
showToday boolean no true Hides the "Today" button if false
type string no basic Type of input to render. Available options: 'basic' and 'range'
value Date|Date[] no -- The value of the datepicker

Form.Input Props

  • autoComplete
  • className
  • disabled
  • error
  • iconPosition
  • id
  • inverted
  • label
  • loading
  • name
  • placeholder
  • size
  • transparent
  • readOnly

Dayzed Props

  • date
  • maxDate
  • minDate
  • firstDayOfWeek
  • showOutsideDays
  • selected

Customization

In order to customize the elements, you can override the styles of the classes below:

  • clndr-cell
  • clndr-cell-today
  • clndr-cell-inrange
  • clndr-cell-disabled
  • clndr-cell-selected
  • clndr-cell-other-month

If you think this way of customizing is not a good idea, feel free to open an issue suggesting something else. This was the simplest solution I thought.

Roadmap

  • Add more tests (including e2e)

Feel free to open issues and/or create PRs to improve other aspects of the library!

Contributors

Thanks goes to these wonderful people (emoji key):


Arthur Denner

💻 🎨 📖 💡 🤔

Emerson Laurentino

💻 🤔 📖 💡

Lucas Borges

💻 📖 💡

Rallysson

📖

Samin Yousefnia

🌍

James J. Alavosus

💻 💡 🤔

Jakub Wietrzyk

💻 🌍

Ben Hancock

💻

Gallevy

🌍

Adam Grawender

🌍

xzessmedia

🌍

oriolhub

🌍

Colin Ramsay

💻

Gencer W. Genç

🌍

pivotal-james-zcheng

💻

Christian Moen

🌍

Artawood Chitamitara

📖

unbugged

💻 🐛

Shin YeongJae

🌍

Jørgen Vatle

🌍

Denis

💻

kmoutzou

💻

JurajFE

💻

Daniel Huisman

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

LICENSE

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].