Custom date format in the wishlist view

To provide a Custom date format in the wishlist view

step1:

Go to Online Store > Themes > Customize > From there, add the below script in the Additional HTML section in App Embeds.


step2:

define your own function for formatting the date, find the example below:


<script> window.WishlistHero_CustomDateFormatFunction= function(dbDate){​​​​​ var month_names = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ]; var day = dbDate.getDate(); var month_index = dbDate.getMonth(); var year = dbDate.getFullYear(); return " " + month_names[month_index] +", " + day + " " + year; }​​​​​ </script>
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us