Geek Culture
Published in

Geek Culture

Dynamically set the max min date at input field with React

How to specify the min and max date and number in html input field in React

In this article, I will show you a very simple example to demonstrate the situation that if you writing a admin to limit the date range, let say your company allow employee to take an birthday leave 2weeks before or after his birthday. We can do it as follow.

Photo by Gabriel Dizzi on Unsplash




A new tech publication by Start it up (

Recommended from Medium

Redux Toolkit

5 minutes quick deep dive to understand React Context, Provider,Consumer and Redux by reading its…

🔥Wielding a weapon in an endless space is truly mesmerizing🔥

Splitting Javascript Classes Into Different Files

Why & how we migrated to Vue from Blaze

Getting started with npm and package.json

#Day 1: Introduction of Vue || 30 Days of Vue

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Teaching JavasScript, React, React Native, MongoDB and NodeJS

More from Medium

Build an Instagram Feed UI Clone with React, Next.js and Tailwind CSS

Create a login form using formik in react js

The Essential Meta Tags for Social Media in examples

How To Create A Carousel In React