I need the date format to be YYYY/MM/DD. Selecting a predefined range works perfectly. I get the right startDate and endDate values in YYYY/MM/DD thanks to moment.
However, when a user selects custom range and picks a start and end date, I see this in the response objects for start and end dates:
Hi, I have this in my controller:
I need the date format to be YYYY/MM/DD. Selecting a predefined range works perfectly. I get the right startDate and endDate values in YYYY/MM/DD thanks to moment.
However, when a user selects custom range and picks a start and end date, I see this in the response objects for start and end dates:
endDate: Fri Sep 09 2016 23:59:59 GMT-0700 (PDT)
startDate: Thu Sep 08 2016 00:00:00 GMT-0700 (PDT)
How do I get the same YYY/MM/DD format for custom ranges?