Fb:editor-date

From Facebook Developers Wiki

Jump to: navigation, search

Contents

[edit] Description

Creates two drop down list boxes that let a user select a date. The month is listed using a three-letter abbreviation, and the day is listed as a numerical digit from 1 to 31 (with no leading zeroes).

You can only use one date selector per page.


[edit] Attributes

RequiredNameTypeDescription
required label string The label to display to the left of both selectors.
optional value int The Unix timestamp of the date to display when the page loads. (Default value is Dec 31.)


[edit] POST Variables

RequiredNameTypeDescription
date_month int A value in the range of [1-12] representing the selected month.
date_day int A value in the range of [1-31] representing the selected day.


[edit] Examples

<fb:editor-date label="Date:" value="1199142000" />
fb-editor-divider.gif


[edit] Notes

  • Using more than one fb:editor-date results in only the last date object being submitted in the postback.
  • You need to validate the data this control provides as it can generate illegal date combinations such as February 31.
  • If you post back to the same page, then the previous selection does not persist (appearing as if a validation error occurred).
  • You cannot apply a name attribute to this tag; otherwise, no data is returned in the postback.
  • If you need more than one date selector, use fb:editor-custom and insert the markup yourself.