--- title: "How to Set max Date in Text Input Component" slug: "how-to-set-max-date-in-text-input-component" updated: 2023-01-30T05:57:53Z published: 2023-01-30T05:57:53Z canonical: "help.pillir.io/how-to-set-max-date-in-text-input-component" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.pillir.io/llms.txt > Use this file to discover all available pages before exploring further. # How to Set max Date in Text Input Component? To set max Date in a text input component of type 'Date', the user can use the logic displayed in the image: ![SetMaxdateLogic](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/SetMaxdateLogic.png) In the above image, the onPageShow script of Homepage has set the 'max' property of the Date component to **current date** so that the future dates are disabled. The following image displays the output of the logic. ![setmaxdate-preview-new](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/setmaxdate-preview-new.png) NoteIt is important that the Date is of the format **YYYY-MM-DD**.