Hey guys.
I upgraded from Dawn 2.3.0 to 3.0 recently and I've noticed that a piece of custom liquid I used to have working is no longer working. I don't know if it's related, however.
<p> We aim to dispatch all orders by the end of the next working day. Our courier should deliver to you between <strong><span id="fromDate"></span> - <span id="toDate"></span></strong></p>
{{ '//cdnjs.cloudflare.com/ajax/libs/datejs/1.0/date.min.js' | script_tag }}
<script>
var fromDate = Date.today().addDays(5);
if (fromDate.is().saturday() || fromDate.is().sunday()) {
fromDate = fromDate.next().monday();
}
var toDate = Date.today().addDays(10);
if (toDate.is().saturday() || toDate.is().sunday()) {
toDate = toDate.next().monday();
}
document.getElementById('fromDate').innerHTML = fromDate.toString('dddd MMMM dS');
document.getElementById('toDate').innerHTML = toDate.toString('dddd MMMM dS');
</script>
It used to show "We aim to dispatch all orders by the end of the next working day. Our courier should deliver to you between <date 1> and <date 2>."
As you can see below, the dates no longer show. Is there anything immediately obvious that I'm missing now?
Hi @OliviaMichaelCo,
I tested and it works fine:
did you change it?
Hey @LitExtension it seems to be working now. I didn't change anything, it just started working. Weird.
Thanks for the reply.
Hi, thank you for the code @OliviaMichaelCo
Can you explan me why my date is displayed in english ? I want the french version 😉
Thanks in advance for your help.
@LitExtension
User | RANK |
---|---|
38 | |
34 | |
15 | |
12 | |
10 |