We'd like to be able to pass "Q" into the toString function for a date and have it return the quarter. ex. kendo.toString(new Date(2000, 10, 6), "Q") -> Q4
Hi Brandon,
The described functionality can be achieved by a bit of JavaScript code as illustrated below:
function getQuarter(date) {
var month = date.getMonth() + 1;
return "Q"+ (Math.ceil(month / 3));
}
The approach is also illustrated in this dojo:
https://dojo.telerik.com/ItUsoMiM
Regards,
Viktor Tachev
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.