#1 2018-03-23 22:58:41

array81
Member
From: Italy
Registered: 2010-07-23
Posts: 411

Edit TSQLRecord structure before pass it to mustache template

On a MVC/MVVM Web application I have a TSQLRecord with a TDateTime record.
I need retrive the records of this table and send it to mustache template to fill a html form.
On html form I have 2 field, one field for date and one field for time, the use can edit these fields and then submit the new value to record them on database.

My problem TSQLRecord have a only proprerty TDateTime (for date and time) so I need split this before send it to mustache template.

How can I split the date and the time and add it to TSQLRecord before send it to mustache template?

Offline

#2 2018-03-24 00:40:03

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,669
Website

Re: Edit TSQLRecord structure before pass it to mustache template

You can define and use a Mustache helper function to extract the value.

Offline

Board footer

Powered by FluxBB