Module: tastypie/fields/date

Field class for dealing for formatted Dates with out Time information


new (require("tastypie/fields/date"))( [options])

Extends:
Parameters:
Name Type Argument Description
options Object <optional>
Properties
Name Type Argument Default Description
format String <optional>
%F
Source:
Example
var x = new tastypie/fields/date();

Requires

Methods


<protected> augment(resource, name)

Injects dynamic properties onto field instance for later use

Parameters:
Name Type Description
resource Resource

the resource instance this field is attached to

name String

The property name this field is associated to

Inherited From:
Source:

convert(val)

Converts data value into the serialization specific type.

Parameters:
Name Type Description
val Mixed

value to convert

Inherited From:
Source:
Returns:

value The converted field value

Type
Mixed

dehydrate(object, attribute)

Converts a javascript object / value into something sutable for seriaation. ex. Date formatting

Parameters:
Name Type Description
object Object

Object to dehydrate before serialization

attribute Sting | function

a name path or function to use to retrieve a value from the object

Inherited From:
Source:
Returns:

value object value converted to its internal type

Type
Mixed

format()

returns a sample of the format expected and returned by a field

Inherited From:
Source:
Returns:

The format expected for a particular field type

Type
String | undefined

hydrate(bundle)

Converts a serialized value in to a javascript object value

Parameters:
Name Type Description
bundle Bundle

a bundle representing the current request

Inherited From:
Source: