Looking for help?
Categories
< All Topics
Print

How to provide a Custom date format in the wishlist view

To provide a Custom date format in the wishlist view, Please open wishlisthero-styles.liquid File and 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>