longbill / jquery-date-range-picker

A jQuery plugin that allows user to select a date range
MIT License
1.12k stars 579 forks source link

StartDate to two days ahead #435

Closed cbordon closed 6 years ago

cbordon commented 6 years ago

Hi I was wondering if there was an easy way to pick the startDate to be two days ahead of the current date. Or will I just have to make the calculation and generate the string myself?

Thanks.

holtkamp commented 6 years ago

Thanks for the question, did you already try something? Something like:

{ startDate: new Date(Date.now() + 2 * 24 * 60 * 60 * 1000) }

cbordon commented 6 years ago

I figured it out using moment.js. I just added .add( '5' , 'days'); and it worked for me.

Thank you.

cbordon commented 6 years ago

I figured it out using moment.js. I just added .add( '5' , 'days'); and it worked for me.

Thank you.

cbordon commented 6 years ago

I figured it out using moment.js. I just added .add( '5' , 'days'); and it worked for me.

Thank you.