Class: MonthRangePicker maps.nyc.gov

nyc.MonthRangePicker

new MonthRangePicker(options)

A UI class to pick a month range
Parameters:
Name Type Description
options nyc.MonthRangePicker.Options Constructor options
Source:

Extends

Members

currentVal :JQuery

A JQuery element used to display a readable representation of the current value
Type:
  • JQuery
Inherited From:
Source:

maxMonth :number

The maximum zero-indexed month
Type:
  • number
Source:

maxYear :number

The maximum year
Type:
  • number
Source:

minMonth :number

The minimum zero-indexed month
Type:
  • number
Source:

minYear :number

The minimum year
Type:
  • number
Source:

Methods

off(eventName, evtHdlr, hdlrScopeopt)

Remove a previously connected event handler
Parameters:
Name Type Attributes Description
eventName string The name of the event to which the handler will be connected
evtHdlr function The event handler function
hdlrScope Object <optional>
The scope in which to invoke the event handler
Inherited From:
Source:

on(eventName, evtHdlr, hdlrScopeopt)

Connect a function to an event
Parameters:
Name Type Attributes Description
eventName string The name of the event to which the handler will be connected
evtHdlr function The event handler function
hdlrScope Object <optional>
The scope in which to invoke the event handler
Inherited From:
Source:

one(eventName, evtHdlr, hdlrScopeopt)

Connect a function to an event for a single invocation
Parameters:
Name Type Attributes Description
eventName string The name of the event to which the handler will be connected
evtHdlr function The event handler function
hdlrScope Object <optional>
The scope in which to invoke the event handler
Inherited From:
Source:

trigger(eventName, dataopt)

Trigger a named event with event data
Parameters:
Name Type Attributes Description
eventName string The name of the event to trigger
data Object <optional>
The event data
Inherited From:
Source:

val() → {nyc.MonthRangePicker.DateRange}

Returns the date range value
Source:
Returns:
The date range
Type
nyc.MonthRangePicker.DateRange

Type Definitions

DateRange

Date range object
Type:
  • Object
Properties:
Name Type Description
start Date The start of the range
end Date The end of the range
Source:

Options

Constructor options for nyc.MonthRangePicker
Type:
  • Object
Properties:
Name Type Description
minMonth number The zero-based index of the minimum month
minYear number The 4 digit minimum year
maxMonth number The zero-based index of the maximum month
maxYear number The 4 digit maximum year
target String | Element | JQuery The DOM target
Source: