How to setup imput ou time in Grid (jquery)

1 Answer 90 Views
Grid
Sergio
Top achievements
Rank 1
Sergio asked on 22 Apr 2022, 12:07 PM

How setup griid column in jquery.

I use this format, bit on input I get a date on the dropdown, not the time to chose

I need just the the time part, the date part is from "dataIni" field.

Another issue is the inline errors. I get error on field "hIni1" not on "Inicio 1"

                   $("#horarios").kendoGrid({
                        height: 550,
                        sortable: true,
                        pageable: true,
                        height: 550,
                        toolbar: [{ name: "create", text: "Inserir" }],
                        columns: [
                            { field: "dataIni", type: "date", format: "{0:yyyy-MM-dd}", title: "Data Inicio", width: "250px" },
                            { field: "hIni1", type: "date", format: "{0:HH:mm}", title: "Inicio 1", width: "120px" },
                            { field: "hFim1", type: "date", format: "{0:HH:mm}", title: "Fim 1", width: "120px" },
                            { field: "hIni2", type: "date", format: "{0:HH:mm}", title: "Inicio 2", width: "120px" },
                            { field: "hFim2", type: "date", format: "{0:HH:mm}", title: "Fim 2", width: "120px" },
                            { command: ["edit", "destroy"], title: " ", width: "250px" }
                        ],
                        editable: "popup" // OR editable: { mode : "popup" }
                    });

Best regards

Sergio

 

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 27 Apr 2022, 08:28 AM

Hi Sergio,

If you need to use TimePicker as an editor in the Grid you will need to configure a custom editor. You can use the editable.template option to configure the needed widget. You could take a look at the examples in the API:

- https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/editable.template

Regarding the error issue, could you please elaborate a little bit more on the desired result? By default, the error message is displayed below the validated field (screencast). As far as I understand on your end the validation message is rendered as expected, but you need to customize the position where it is displayed. Is this correct? Do you need to display the error message below/next to the title or on some other custom position? 

Looking forward to your reply.

Regards,
Neli
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/.

Tags
Grid
Asked by
Sergio
Top achievements
Rank 1
Answers by
Neli
Telerik team
Share this question
or