Unplanned
Last Updated: 18 Oct 2021 07:02 by ADMIN
Faraz
Created on: 14 Oct 2021 12:10
Category: Spreadsheet
Type: Feature Request
1
Is there a function to tell that the format applied to the kendo spreadsheet cell is of date

Hi,

There are multiple formats for date and time in kendo and in different cultures the count increases. Is there a function in which i pass spreadsheet cell value and format and it returns that it is a date format or number format. I just want to know the type of format so i can parse the dates on my own from json on server side.

 

Regards,
Faraz

3 comments
ADMIN
Veselin Tsvetanov
Posted on: 18 Oct 2021 07:02

Hi Faraz,

Thank you for the suggested workaround which properly identifies the type of the current cell format. As per adding a formatType() function to the Spreadsheet Range object API, we will keep the current thread open and monitor the interest among the community.

Regards,
Veselin Tsvetanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Faraz
Posted on: 15 Oct 2021 10:38

Hi Veselin,

 

I found a hack to do it

el.cells = el.cells.map(o => ({ index: o.index, value: o.value, type: typeof (o.format) == "undefined" ? "" : kendo.spreadsheet.formatting.type(o.value, o.format) }));


But please do add type attribute a cell property so ToJSON is called we can have type of cell.

 

Regards,
Faraz

ADMIN
Veselin Tsvetanov
Posted on: 15 Oct 2021 10:26

Hi Faraz,

The Spreadsheet Range object does not have a dedicated function that would specify a given cell format as a Date or not. Unfortunately, I cannot think of any approach that would allow you to obtain the information needed.

That is why I have converted the current tread to a feature request in our Feedback portal. Here is where you could find the public item on it:

https://feedback.telerik.com/kendo-jquery-ui/1539263-is-there-a-function-to-tell-that-the-format-applied-to-the-kendo-spreadsheet-cell-is-of-date

Do not forget to cast your vote for it as that would move the request sooner in our implementation queue.

Regards,
Veselin Tsvetanov
Progress Telerik

Remote troubleshooting is now easier with Telerik Fiddler Jam. Get the full context to end-users' issues in just three steps! Start your trial here - https://www.telerik.com/fiddler-jam.