Tutorialsplane

Materialize Date Picker


Materialize Date Picker : Date Picker is an important component of any framework which enables us to select the date from the calendar. Materialize provides a script to create cool date picker which can be easily integrated anywhere. Here in this tutorial, we are going to explain how you can use date picker script in Materialize Css. You can also use our online editor to edit and run the code online.


Materialize Date Picker | Time Picker| Calender | Format | Options | MaterializeCss Example

Let us create a simple date picker in Materialize. There are basically two parts first html and second JavaScript, in html part just create an input type date and add a class name to this, JavaScript part contains the calendar initialization part. Here is complete example of Date Picker –

Materialize Date Picker Example:

  
 

Try it »

If you run the above example it will produce output something like this –

:

Date Format

If you want to set or change the date format, you can do this by passing format:’dd/mm/yyyy’ option simply as below-

Date Picker Format In Materialize Caleneder:

  
 

Try it »

Options Format

Following options / Format are available for configuration of Date Picker.

Time Picker

You can initialize timepicker using class on input field. Here is an example of timepicker in Materialize Css.

Date Picker Format In Materialize Caleneder:

  
 

Materialize timepicker looks like this-

Materialize Tutorial

Css

Component

JavaScript