3

Top 12 React Datepickers to Consider for Your Next Web Dev Project

 2 years ago
source link: https://hackernoon.com/top-12-react-datepickers-to-consider-for-your-next-web-dev-project-u94c37lp
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Top 12 React Datepickers to Consider for Your Next Web Dev Project

Datepickers are important just because they help to select a date from a calendar and/or time from a time range. A React Datepicker is a widget that allows the end-user to see and select days, months, years, etc., from the calendar. It also sometimes includes the possibility of choosing both date and time or only time. The Advantages of using a React datepicker include the ability to set or choose the date with only a mouse. The process of creating a simple React DatePicker consists of the following stages: Creating a new React App;Installing Datepicky in React App, installing Bootstrap UI Framework; adding the third and adding the.

@katarinaharbuzawaKatarina Harbuzava

Writer, digital nomad, life lover. https://flatlogic.com/templates

Let's get a deeper look into the theme of React Datepickers. Datepickers are important just because they help to select a date from a calendar and/or time from a time range.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

What is a React Datepicker

Generally speaking, a Datepicker is a GUI widget that allows the end-user to see and select days, months, years, etc., from the calendar. It also sometimes includes the possibility of choosing both date and time or only time. In that case, such widgets are, totally unsurprisingly, called date and time pickers, and timepicker respectively. Thus, React Datepicker is a Datepicker that is built on the React basis. 

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Looked at in a more practical way, a React Datepicker is a lot more than just a tool. It is a way to simplify the end-user experience when using your site or app and to make it more convenient. Let’s clarify what we mean by presenting a couple of small benefits of using this widget.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

The Advantages of React Datepicker

If used on a browser version of a site, a React Datepicker allows users to set or choose the date with only a mouse and removes the necessity to write down the date. And giving the end-user an option is always a nice touch as it’s better they have something they don’t need than need something they don’t have.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Having a React Datepicker will simplify the visual presentation of available date options. For example, if the date is unavailable for choosing, the widget will not provide the possibility of choosing a said date.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Using a React Datepicker eliminates the chance that the end-user will select any nonexistent dates, such as February 30th or, more realistically, September 31st.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Many React Datepickers allow a choice of date ranges, thus, conveniently narrowing down the choice for the end-user.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

React Datepickers solve the problem of date format confusion. This point might need a little elaboration. For example, an end-user has put down the following date – 12/05/21. Does this date mean May 12th, 2021, or December 5th, 2021? A React Datepicker solves the problem and visually shows you and our hypothetical end-user what day of what month and in which year the hypothetical end-user has chosen. 

0 reactions
heart.png
light.png
money.png
thumbs-down.png

So, as you can see, a datepicker might seem a small and inconsequential widget, but it provides convenience to both users and admin. And, as we’ve already mentioned, while its presence might go unnoticed, if required, its absence would definitely cause a negative reaction. That being said, we suggest having a closer look into the inner workings of a React Datepicker with an example of the stages of one such widget development.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

How to create a basic React Datepicker

The process of creating a simple React Datepicker consists of the following stages:

0 reactions
heart.png
light.png
money.png
thumbs-down.png
  • Creating a new React App;
  • Installing Datepicker in React App;
  • Installing Bootstrap UI Framework;

And that’s basically it. Of course, in this instance, we are talking about the simplest version of such a widget. And even in this case, you have quite a creative space for UI Framework tinkering. So, now it’s time to get an even closer look into each of the stages. 

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Creating a new React App

0 reactions
heart.png
light.png
money.png
thumbs-down.png

This point is just what it says on the tin. You use the “create-react-app” command to set up a new program. At the end of this stage, you get the following lines of code:

0 reactions
heart.png
light.png
money.png
thumbs-down.png
npx create-react-app react-datepicker-app
0 reactions
heart.png
light.png
money.png
thumbs-down.png
cd react-datepicker-app
0 reactions
heart.png
light.png
money.png
thumbs-down.png

To check the app at this point, localhost:3000 is the location.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Installing Datepicker in React App

0 reactions
heart.png
light.png
money.png
thumbs-down.png

The next step is actually installing a Datepicker into your app. You can do this via both npm and yarn.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

To install a datepicker via npm – use the following line of code: 

0 reactions
heart.png
light.png
money.png
thumbs-down.png
npm install react-datepicker –save
0 reactions
heart.png
light.png
money.png
thumbs-down.png

And to do it via yarn, use the code as follows: 

0 reactions
heart.png
light.png
money.png
thumbs-down.png
yarn add react-datepicker
0 reactions
heart.png
light.png
money.png
thumbs-down.png

Installing Bootstrap UI Framework

0 reactions
heart.png
light.png
money.png
thumbs-down.png

The third and final step in creating a basic React Datepicker is adding the Bootstrap intuitive ready-made styling that will also serve as a powerful tool for front-end development. You can also do it via both npm and yarn.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

The line of code for npm is:

0 reactions
heart.png
light.png
money.png
thumbs-down.png
npm install bootstrap –save
0 reactions
heart.png
light.png
money.png
thumbs-down.png

And for yarn, it goes like this: 

0 reactions
heart.png
light.png
money.png
thumbs-down.png
yarn add bootstrap
0 reactions
heart.png
light.png
money.png
thumbs-down.png

Bear in mind the necessity of having a CSS format file with your stylings or any downloaded stylings of your choosing.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Of course, such a created date picker might not meet all of your requirements. That’s why we suggest using any of the entrees from our following list. After all, why not use an already made template for your app, if it suits your requirements perfectly or almost perfectly, with a possibility of making changes to it?

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Top React Datepickers to consider for your next project

1.     react-datepicker

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Let’s, first of all, get the classic out of the way. react-datepicker is one of the most popular date pickers on the market today. There is a downside to consider, which is that in its standard form, react-datepicker is in English. So, if your next app or project is not in English, it will require a bit of tinkering around with to change. But, nonetheless, it is simple, reliable and you can never go wrong with a classic.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

2.     Material-UI date and time pickers

0 reactions
heart.png
light.png
money.png
thumbs-down.png

High-quality date and time pickers are included in one of the world’s most popular component libraries – Material-UI. Better yet, Material-UI, being a nice component library, has already separated their selection of date and time pickers into a package.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

But this is not the only reason it is on this list. Material-UI date and time pickers are also neat, beautifully designed widgets that use dialogue windows and/or inline popovers to provide a possibility of selecting separate dates. And, as a nice little touch, current dates are indicated by a different color and type weight.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

3.     React Material Admin Full Datepicker

0 reactions
heart.png
light.png
money.png
thumbs-down.png

This date picker can be described as exceptionally stylish and smooth-looking. By coming along as a part of ready to use React Material-UI Admin & Dashboard Template, it can serve as an organizer for any kind of task management. Using it for your next project by itself or as a part of the ADT would be a smart thing to do.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

4.     Airbnb react-dates

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Airbnb hasn’t become one of the most used travel-related projects by cutting corners. Although we cannot claim that it is perfect in any way, what we can say with certainty is that Airbnb’s react datepicker is sleek and accessible, as well as being mobile-friendly, which is always good. And, it should be mentioned, Airbnb react-dates is trying to differentiate the formula by not fully relying on CSS but rather on react-with-styles.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

5.     Carbon design date picker

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Due to being created by IBM, Carbon design React date picker is one of the most thought-through widgets on the market today. This component library is tried, tested, polished, and constantly maintained to answer to the highest industry standards. And the whole system stands on three pillars: a simple date input, calendar pickers, and a time picker. But each pillar is strong enough to hold on its own, so there is a possibility to use each component independently. A must-see. Or, to be more precise, a must-try.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

6.     React Rainbow datepicker

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Another library entry is on our list. React Rainbow datepicker is packed to the brim with different colorful and high-quality, tested, accessible, and eye-catching components. In fact, there are over 80 of them in this library. Each one can be downloaded individually via the link below, and each one of them can, no doubt, certainly become a beautiful addition to your project.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

7.     Sing App React Datepicker

0 reactions
heart.png
light.png
money.png
thumbs-down.png

A date picker entry comes as a part of a React Admin Dashboard Template. It retains all the factual usefulness and overall stylishness while adding a bunch of useful features that come with being a part of ADT. And, as you can see from the picture, it also allows for task highlighting on the overall dialogue window. In summary, Sing App React Datepicker is beautiful and more useful than most other date pickers. What is awesome about this datepicker is that it can contain event data.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

9.     react-datetime-picker

0 reactions
heart.png
light.png
money.png
thumbs-down.png

React-datime-picker is a two-for-one offer. Created by Wojciech Maj, these date pickers also include the preinstalled time picker, and neither of them relies on momentjs. Instead, it provides quite a flexibility that allows for creating anything from decade pickers to numbered weeks, which might come in handy in some specific situations.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

10.     react-big-calendar

0 reactions
heart.png
light.png
money.png
thumbs-down.png

This date picker would be most useful if used as an organizing tool or event calendar, as it uses flexbox over the classic tables-ception approach. It is based on React and is compatible with the latest browser versions. Also, react-big-calendar includes the possibility of custom stylings, and the inclusion of SASS files is a cherry on the cake.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

11.  Light Blue React Node.Js Datepicker

0 reactions
heart.png
light.png
money.png
thumbs-down.png

This product also comes as part of the whole React Admin Dashboard Template (which comes with a full Node.JS Backend). But Light Blue React Node.Js Datepicker also doubles by being a time picker, as it allows users to choose a particular time for each of the highlighted tasks. And, by pulling those duties, this date picker is a must-try for your next project.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

12.  react date range picker

0 reactions
heart.png
light.png
money.png
thumbs-down.png

React date range picker is a useful React component that can be a nice addition to any app! It allows the user to choose a date range inside an opening calendar. It is small in size, occupying only 18 kilobytes of space, and relies on date-fns.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

13.  Ant design datepicker

0 reactions
heart.png
light.png
money.png
thumbs-down.png

This date picker’s design is so smooth and elegant that we can only compare it to the sharply dressed aesthetic of the Roaring 20’s ladies and gentlemen. It also doesn’t do any harm that this datepicker is a part of a well-known and popular ant design library. If you’re not used to working with MomentJS, you can always replace it with a lib of your choice. But, not taking that into consideration, Ant design datepicker is an all-around cool and beautiful date and time picker.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

React Native Datepickers

React Native DatePickers are also commonly used web components available for iOs and Android, TimePickerAndroid, and DatePickerIOS. Here is one of the most popular repositories with React Native date picker widely known among developers. And a full list of react native libraries may be checked here.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

React Bootstrap Datepickers

Just from scratch, we can offer several popup calendars/datepickers for React (using Bootstrap): react-bootstrap-datetimepicker or react-bootstrap-daterangepicker, and the React-Bootstrap based date picker itself. They work well with React 0.14.x and 0.15.x and start running with:

0 reactions
heart.png
light.png
money.png
thumbs-down.png
npm install react-bootstrap-date-picker
0 reactions
heart.png
light.png
money.png
thumbs-down.png

We could also recommend using FullCalendar that integrates perfectly with React. Fullcalendar matches the functionality of FullCalendar’s standard API. Fullcalendar documentation is wholly described and presented here.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Recap

In conclusion, we would like to say that even though a date and/or time picker might seem inconsequential, bear in mind the simple truth that the best and biggest things, be it a site, an app, or a building, are all made up of tiny, seemingly inconsequential things. And that makes them beautiful at the end of the day. So, choosing the right little things is the right passage to creating something great and meaningful.

0 reactions
heart.png
light.png
money.png
thumbs-down.png
5
heart.pngheart.pngheart.pngheart.png
light.pnglight.pnglight.pnglight.png
boat.pngboat.pngboat.pngboat.png
money.pngmoney.pngmoney.pngmoney.png
by Katarina Harbuzava @katarinaharbuzawa. Writer, digital nomad, life lover. https://flatlogic.com/templatesStay tuned!
Join Hacker Noon

Create your free account to unlock your custom reading experience.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK