JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Gantt › Blazor gantt Task column format
- This topic has 6 replies, 2 voices, and was last updated 2 years, 11 months ago by
admin.
-
AuthorPosts
-
July 12, 2021 at 9:59 am #102042
Maserati
MemberHow do I change the format of a date in a task column. The documentation says use a formatFunction but there is nothing else to help explain how to do this.
July 13, 2021 at 5:58 am #102046admin
KeymasterHi Maserati,
In the Blazor Gantt, we still do not have such functionality added. We will create a work item about it and this will most probably happen by using a formatString option in the columns.
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/September 21, 2021 at 12:48 pm #102253Maserati
MemberHas this been fixed yet? there is a
<pre id=”apiView”>formatFunction shown in the Blazor docuemntation but no example of ho to ouse it.
I need:
1) to change the date format and
2) to display percentages %
thanksSeptember 22, 2021 at 7:35 am #102273admin
KeymasterHi Maserati,
In a task column you can set the ‘DateFormat’ to a string like ‘dd-MM-yyyy’.
Ex:
// short date pattern
‘d’ – ‘M/d/yyyy’,
// long date pattern
‘D’ – ‘dddd, MMMM dd, yyyy’,
// short time pattern
‘t’ – ‘h:mm tt’,
// long time pattern
‘T’ – ‘h:mm:ss tt’,
// long date, short time pattern
‘f’ – ‘dddd, MMMM dd, yyyy h:mm tt’,
// long date, long time pattern
‘F’ – ‘dddd, MMMM dd, yyyy h:mm:ss tt’,
// month/day pattern
‘M’ – ‘MMMM dd’,
// month/year pattern
‘Y’ – ‘yyyy MMMM’,
// S is a sortable format that does not vary by culture
‘S’ – ‘yyyy’-‘MM’-‘dd’T’HH’:’mm’:’ss’
Date format strings:
‘d’-the day of the month;
‘dd’-the day of the month
‘ddd’-the abbreviated name of the day of the week
‘dddd’- the full name of the day of the week
‘h’-the hour, using a 12-hour clock from 1 to 12
‘hh’-the hour, using a 12-hour clock from 01 to 12
‘H’-the hour, using a 24-hour clock from 0 to 23
‘HH’- the hour, using a 24-hour clock from 00 to 23
‘m’-the minute, from 0 through 59
‘mm’-the minutes,from 00 though59
‘M’- the month, from 1 through 12
‘MM’- the month, from 01 through 12
‘MMM’-the abbreviated name of the month
‘MMMM’-the full name of the month
‘s’-the second, from 0 through 59
‘ss’-the second, from 00 through 59
‘t’- the first character of the AM/PM designator
‘tt’-the AM/PM designator
‘y’- the year, from 0 to 99
‘yy’- the year, from 00 to 99
‘yyy’-the year, with a minimum of three digits
‘yyyy’-the year as a four-digit number;
‘yyyyy’-the year as a four-digit number.
For the formatFunction – we are currently building new examples for Gantt, Inputs and other components.
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/September 22, 2021 at 9:06 am #102275admin
KeymasterHi,
The latest version of the Blazor Gantt Chart includes a NumberFormat property for the task columns which can be used for formatting of numbers. You can set the property to ‘p’ in order to apply percentages formatting.
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/September 22, 2021 at 12:34 pm #102279Maserati
MemberPeter,
I’m using 10.0.36 and there is no NumberFormat that i can see
thanks
September 22, 2021 at 1:33 pm #102281admin
KeymasterIt is Smart.Blazor.10.0.37
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/ -
AuthorPosts
- You must be logged in to reply to this topic.