From the course: jQuery: Building an Interface

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Formatting data with a data plugin

Formatting data with a data plugin - jQuery Tutorial

From the course: jQuery: Building an Interface

Start my 1-month free trial

Formatting data with a data plugin

- [Instructor] Next, we need to start working on adding appointments by using this form right here. But before we do that, I want to modify the way that these dates are looking. You can see that they're in military format, which isn't always the best way to look at these, except that it's a fantastic way to sort them. So I need to modify the template so that it shows these in the right format while leaving the actual data in its original form. So if you take a look at this data without JSON, you'll notice that these dates are all in this format right here, which is how they're displayed right now. So I want to modify this appointment date without actually modifying the information here, so I want to do that just as the template is converted. To do that, we're going to use a feature of Jquery templating, the plug in we've been using so far, called Formatters. And here's how it works; let's go ahead and scroll down here to this section. And you can see that you can add a template…

Contents