0
 var option={Year:'numeric',Month:'long', Days:'numeric'};
   var selecteddate=new Date(this.value);
   var DOB=selecteddate.toLocaleDateString('en-US',Option);
//    console.log("DOB is:" + DOB)
   ChooseDate.innerHTML="DOB:" + " " + DOB;


This code select the previous day of selected date .....I am finding solution of this please help me.

I have tried many time to find the Solution but no.....

Faizan
  • 3
  • 2
  • Presuming `this.value` returns a string in the format "YYYY-MM-DD", see [*Why does Date.parse give incorrect results?*](https://stackoverflow.com/questions/2587345/why-does-date-parse-give-incorrect-results) If so, then this is a duplicate of that. Posting a minimal working example of the issue would have clarified the situation. – RobG Feb 08 '23 at 05:32
  • 1
    BTW, `option != Option`. ;-) – RobG Feb 08 '23 at 05:35

0 Answers0