Is it possible to show a Date in a MultiColumnComboBox?

1 Answer 115 Views
ComboBox
David
Top achievements
Rank 1
Iron
Iron
Veteran
David asked on 01 Jun 2023, 03:02 AM

As per the question, the documentation mentions nothing about the data types you can show in MultiColumnComboBox columns. If you modify any of the examples in the component documentation to include a Date field, the component blows up when you expand the ComboBox:

https://stackblitz.com/edit/react-biiakp?file=app%2Fmain.tsx

Is this a bug, or should the documentation state that you must format all data to primitive types for use in a MultiColumnComboBox?

Kind regards,

David

1 Answer, 1 is accepted

Sort by
0
Wissam
Telerik team
answered on 02 Jun 2023, 01:40 PM

Hello, David,

Thank you for the provided example.

I tested the MultiColumnComboBox and even though the value is supposed to also accept object types, setting the column field to `hireDate` fires a `Objects are not valid as a React child` error. Therefore, I logged an GitHub item for this bug, you can track it here:

As a workaround, you can use the `.toDateString()` method on the Date object:

In addition, I updated your Telerik points as a small token of gratitude for your report.

Regards,
Wissam
Progress Telerik

As of R2 2023, the default icon type will be SVG instead of Font. See this blogpost for more information.
Tags
ComboBox
Asked by
David
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Wissam
Telerik team
Share this question
or