Vue flatpicker default date not working

vue flatpicker date

In that case, if you want to disable past dates in vue flatpicker follow the below steps,

1. Add minDate in config

 config: {
      wrap: true, // set wrap to true only when using      'input-group'
      altFormat: 'M j, Y',
      altInput: false,
      dateFormat: 'Y-m-d',
      minDate:new Date(), // it will disable the past date from the current date  

If you are in case here you need to select the today date in by default then this code will not worked , Then you need to follow the steps 2

2. Modify the minDate config

Then you have to use that code

minDate:new Date().fp_incr(0), // here 0 is the date which you want to select for the past date default it set for the before the today date

In you should use that config and you can update or get seleted the date in the vue flatpicker.

    config: {
      wrap: true, // set wrap to true only when using 'input-group'
      altFormat: 'M j, Y',
      altInput: false,
      dateFormat: 'Y-m-d',
      minDate:new Date().fp_incr(0),      

Thanks i hope it will help you.

5 1 vote
Article Rating

Do you want to hire us for your Project Work? Then Contact US.
Spread the love
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x