I want to change the highlighted estimated delivery dates on my website WEB URL: glymmerclothing.com

I’ve tried everything in order to change the estimated delivery date, the date is calculated according to the javascript (see code), and I’ve placed the code in my theme-editor.js file. Still, for some reason, javascript isn’t calculating correctly, (you can actually see that the range in the code is different from the range that’s showing on my website) If I change the number of days, the range keeps being stuck between 6 and 10 (I believe working days only) from now. Does anyone know how to fix this??? Any help will be appreciated!!!

// estimate the delivery date
if(document.getElementById('fromDate')) {
  
  var dateStart = 8;
  var dateEnd = 12;

  var fromDate = Date.today().addDays(dateStart);
  if (fromDate.is().saturday() || fromDate.is().sunday()) { 
    fromDate = fromDate.next().monday();
  }
  var toDate = Date.today().addDays(dateEnd);
  if (toDate.is().saturday() || toDate.is().sunday()) { 
    toDate = toDate.next().monday(); 
  }
  document.getElementById('fromDate').innerHTML = fromDate.toString('dd/MM');
  document.getElementById('toDate').innerHTML = toDate.toString('dd/MM');
}
})();

/* Start */
.template-page .page-width {max-width: 100% !important;} 
/* End*/

Thanks for your help so far, however, it’s not entirely working out yet. Am I supposed to replace my previous code with your new code? That’s precisely what I’ve done but it doesn’t seem to work out. By the way; this is the code that’s currently in my main-product-liquid file, shouldn’t this be changed too?


            

![return_pictogram_8c54f765-dc04-4556-9024-0cf31a0e17fa.png?v=1665422331|3249x3321](upload://iF51hBLIpIJC0VDmBtouxUokFqV.png)
30-day return-option

![AdobeStock_417671236_Converted_fd469bce-d8d5-4d00-b5c9-8d7d29612b8b.png?v=1663054006|5456x3421](upload://ppRhwZiZWJxRqsR4YtZi9BYuNsz.png)
 US delivery within 20/11 and 29/11

Hello Saddhu,

I really appreciate your help so far. I’m not a developer and know almost nothing about web coding, the earlier code was from someone else. I replaced the old code with your new code, but when I change the dates nothing changes on my product page, the time window is fixed and not changeable. How can I solve this?

Could you please react to my message? I would appreciate it a lot!