ERMDatePicker Class Reference

Inherits er::extensions::components::ERXStatelessComponent.

Collaboration diagram for ERMDatePicker:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void appendToResponse (WOResponse response, WOContext context)
void awake ()
String dateformat ()
String dateFormatString ()
String datePickerCreateScript ()
String datePickerOpenScript ()
String elementID ()
 ERMDatePicker (WOContext context)
String name ()
void reset ()
void setDateformat (String value)
void setValue (NSTimestamp newDateIn)
NSTimestamp value ()

Static Public Member Functions

static String optionsStringForTimestamp (NSTimestamp ts)

Static Public Attributes

static final String CSS_FILENAME = "datepicker.css"
static final String FRAMEWORK_NAME = "ERModernDirectToWeb"

Static Package Attributes

static final Logger log = Logger.getLogger(ERMDatePicker.class)

Private Member Functions

String datePickerOptions ()
boolean ne (String v)
String parseDateRangeString (String dateRange)

Private Attributes

String _createScript
String _elementID
String _openScript


Detailed Description

Wrapper around http://www.frequency-decoder.com/2009/09/09/unobtrusive-date-picker-widget-v5/

Because many options take a date with the format of YYYYMMDD there is a utility method: ERMDatePicker.optionsStringForTimestamp(NSTimestamp ts) that will return a correctly formatted string for a given NSTimestamp.

dateIn an NSTimestamp supplying the value for the field (required) cssFile name of the css file (defaults to datepicker.css) cssFramework name of the framework containing the css file (defaults to ERModernDirectToWeb) dateformat string containing the date format for the field injectStylesheet choose whether to dynamically inject the datepicker.css at component load. if used in a ajax loaded component, it may be safer to load this manually.

See date-picker documentation for following optional values:

hightlightDays string - identifies days to highlight on the calendar (format: [0,0,0,0,0,1,1]) rangeLow string - date in format YYYYMMDD defining the lowest selectable date rangeHigh string - date in format YYYYMMDD defining the highest selectable date disabledDays string - identifies days on calendar that are disabled (format: [1,0,1,0,1,0,1]) disabledDates string - date range of disabled dates (format: YYYYMMDD:YYYYMMDD or YYYYMMDD if single date) enabledDates string - date range of enabled dates (format: YYYYMMDD:YYYYMMDD or YYYYMMDD if single date) noFadeEffect boolean - disables fade in/out effect finalOpacity number - sets final opacity (20 - 100) showWeeks boolean - show week numbers noTodayButton boolean - hide the "Today" button cursorDate string - date in format YYYYMMDD that sets the default cursor date dragDisabled boolean - disable dragging of calendar fillGrid boolean - fill all dates, not just those in current month constrainSelection boolean - if fillGrid is yes, constrain selection to current month (defaults to true) hideInput boolean - hide the input field (don't use if hideControl is specified) hideControl boolean - hide the calendar button (don't use if hideInput is specified)

Author:
davidleber

Constructor & Destructor Documentation

ERMDatePicker ( WOContext  context  ) 


Member Function Documentation

void appendToResponse ( WOResponse  response,
WOContext  context 
)

Adds date-picker.js to the header or includes it in an Ajax friendly manner.

See also:
er.extensions.components.ERXNonSynchronizingComponent.appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext)

ERXResponseRewriter.addScriptResourceInHead(WOResponse, WOContext, String, String)

Reimplemented from ERXNonSynchronizingComponent.

void awake (  ) 

String dateformat (  ) 

String dateFormatString (  ) 

Returns:

String datePickerCreateScript (  ) 

String datePickerOpenScript (  ) 

String datePickerOptions (  )  [private]

String elementID (  ) 

String name (  ) 

boolean ne ( String  v  )  [private]

static String optionsStringForTimestamp ( NSTimestamp  ts  )  [static]

String parseDateRangeString ( String  dateRange  )  [private]

void reset (  ) 

Reimplemented from ERXStatelessComponent.

void setDateformat ( String  value  ) 

void setValue ( NSTimestamp  newDateIn  ) 

NSTimestamp value (  ) 


Member Data Documentation

String _createScript [private]

String _elementID [private]

String _openScript [private]

final String CSS_FILENAME = "datepicker.css" [static]

final String FRAMEWORK_NAME = "ERModernDirectToWeb" [static]

final Logger log = Logger.getLogger(ERMDatePicker.class) [static, package]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:23 2012 for Project Wonder by  doxygen 1.5.8