So I got the project working on a tv schedule at work. As you can imagine there is work that needs to be done with dates and times when moving forward / back in the schedule. I found a few things out there that were full blown date/time js libraries, but they were [...]
You know you have… if you are like me though, you can never remember the exact syntax. Here it is:
for (var name in object)
{
if (object.hasOwnProperty(name))
{
alert(name + ‘: ‘ + object[name]);
}
}
For entry, with my validator, I am validating that no matter what a user types in for a height, I convert it to a float to store in the database (5.10). In retrospect, I should convert it to the inches value, but this example isn’t doing that.
For display, with my formatter, I am standardizing [...]
This is the validator I am using to insure that a height (or float) was entered (5’10″, 5′ 10″, 5.10 5 10), and that text (tall, short) was not entered and covert a valid non-float value entered (5’10″, 5′ 10″, 5 10) to a float (5.10), which is how I want to store the [...]
I needed to create a custom formatter for a datatable that contained a cell for an individuals height. The height is stored in the database as a float. 5′ 10″ would be in the database as 5.10. In retrospect I should be storing the height as inches and converting it to feet as [...]