MODULES Uize.Widget.Calendar
- Contents
- 1. Introduction
- 2. DOM Nodes
- 3. Child Widgets
-
4. State Properties
- 4.1. built
- 4.2. busy
- 4.3. busyInherited
- 4.4. busyParentTickle
- 4.5. children
- 4.6. container
- 4.7. dayNameLength
- 4.8. dayNames
- 4.9. displayFormat
- 4.10. enabled
- 4.11. enabledInherited
- 4.12. enabledParentTickle
- 4.13. html
- 4.14. idPrefix
- 4.15. idPrefixConstruction
- 4.16. insertionMode
- 4.17. localized
- 4.18. maxValue
- 4.19. minValue
- 4.20. month
- 4.21. monthNames
- 4.22. name
- 4.23. nodeMap
- 4.24. parent
- 4.25. snapViewOnValueChange
- 4.26. value
- 4.27. wired
- 4.28. year
-
5. Instance Methods
- 5.1. addChild
- 5.2. addChildren
- 5.3. ajax
- 5.4. buildHtml
- 5.5. callInherited
- 5.6. childHtml
- 5.7. childId
- 5.8. confirm
- 5.9. displayNode
- 5.10. fire
- 5.11. flushNodeCache
- 5.12. get
- 5.13. getContainer
- 5.14. getCustomDateUi
- 5.15. getHtml
- 5.16. getInherited
- 5.17. getNode
- 5.18. getNodeStyle
- 5.19. getNodeValue
- 5.20. getProvider
- 5.21. globalizeNode
- 5.22. inform
- 5.23. injectNodeHtml
- 5.24. insertOrWireUi
- 5.25. insertUi
- 5.26. is
- 5.27. isMet
- 5.28. kill
- 5.29. localize
- 5.30. met
- 5.31. nodeId
- 5.32. onChange
- 5.33. once
- 5.34. removeChild
- 5.35. removeNode
- 5.36. removeUi
- 5.37. set
- 5.38. setInherited
- 5.39. setNodeClipRect
- 5.40. setNodeInnerHtml
- 5.41. setNodeOpacity
- 5.42. setNodeProperties
- 5.43. setNodeStyle
- 5.44. setNodeValue
- 5.45. showNode
- 5.46. toggle
- 5.47. unmet
- 5.48. unwire
- 5.49. unwireNode
- 5.50. unwireNodeEventsByMatch
- 5.51. unwireUi
- 5.52. updateUi
- 5.53. valueOf
- 5.54. whenever
- 5.55. wire
- 5.56. wireNode
- 5.57. wireUi
- 6. Instance Properties
-
7. Static Methods
- 7.1. Uize.Widget.Calendar.alphastructor
- 7.2. Uize.Widget.Calendar.declare
- 7.3. Uize.Widget.Calendar.doMy
- 7.4. Uize.Widget.Calendar.dualContextMethods
- 7.5. Uize.Widget.Calendar.dualContextProperties
- 7.6. Uize.Widget.Calendar.fire
- 7.7. Uize.Widget.Calendar.get
- 7.8. Uize.Widget.Calendar.getBlankImageUrl
- 7.9. Uize.Widget.Calendar.instanceMethods
- 7.10. Uize.Widget.Calendar.instanceProperties
- 7.11. Uize.Widget.Calendar.mixins
- 7.12. Uize.Widget.Calendar.omegastructor
- 7.13. Uize.Widget.Calendar.set
- 7.14. Uize.Widget.Calendar.singleton
- 7.15. Uize.Widget.Calendar.spawn
- 7.16. Uize.Widget.Calendar.stateProperties
- 7.17. Uize.Widget.Calendar.staticMethods
- 7.18. Uize.Widget.Calendar.staticProperties
- 7.19. Uize.Widget.Calendar.subclass
- 7.20. Uize.Widget.Calendar.toggle
- 7.21. Uize.Widget.Calendar.treeInheritedStateProperties
- 7.22. Uize.Widget.Calendar.unwire
- 7.23. Uize.Widget.Calendar.wire
-
8. Static Properties
- 8.1. Uize.Widget.Calendar.busyParentTickle
- 8.2. Uize.Widget.Calendar.enabledParentTickle
- 8.3. Uize.Widget.Calendar.isWired
- 8.4. Uize.Widget.Calendar.moduleName
- 8.5. Uize.Widget.Calendar.nonInheritableStatics
- 8.6. Uize.Widget.Calendar.pathToResources
- 8.7. Uize.Widget.Calendar.undefined
- 8.8. Uize.Widget.Calendar.useV2CssClasses
1. Introduction
The Uize.Widget.Calendar
class implements a calendar widget that supports selecting a date within a given date range, with month and year navigation.
DEVELOPERS: Jan Borgersen, Chris van Rensburg
1.1. Key Features
The Uize.Widget.Calendar
module provides the following key features...
Valid Date Range - You can configure a valid date range to limit the date range within which the user can select dates. | |
Navigation Buttons - Month and year navigation buttons let the user navigate the calendar to a different month or year in order to select a date. | |
Navigation Button State Management - The enabled states of the month and year navigation buttons are managed so that they are disabled when their action would take the view outside of a configured valid date range. | |
Date Grid - A date grid, with links for every day of the month, lets the user select a date. | |
Snap View Behavior - A snap view behavior ensures that the date is in view and that the view is not outside of the valid date range after the values of the value , minValue , or maxValue state properties are changed programmatically. |
|
Flexibility in specifying date values - Flexibility in how dates can be specified when setting values for the value , minValue , and maxValue state properties lets you specify dates in any of the ways supported by the Uize.Date.resolve method. |
1.2. Implemented Interfaces
The Uize.Widget.Calendar
implements the following JavaScript interfaces...
Value Interface - This class implements a value state property and, therefore, it implements the value interface. |
|
Value Range Interface - This class implements minValue and maxValue state properties and, therefore, it implements the value range interface. |
1.3. Valid Date Range
The Uize.Widget.Calendar
module supports the ability to limit the date range within which the user can select dates.
It does this by providing the minValue
and maxValue
state properties, where the minValue
property specifies the start date of the valid date range, and the maxValue
property specifies the end date of the range.
1.3.1. Upper and Lower Bounds
When dates are specified for both the minValue
and maxValue
state properties, then date selection can be constrained to a bounded date range - the user will not be able to select a date outside of this range.
EXAMPLE
page.addChild ( 'calendar', Uize.Widget.Calendar, {minValue:'2000-01-01',maxValue:'2099-12-31'} );
In the above example, the user will be able to select a date only in the 21st century - not in the 20th century or earlier, and not in the 22nd century or beyond.
1.3.1.1. Using Uize.Date.getRangeAround
When supplying values for the minValue
and maxValue
state properties, it may be useful to use static methods of the Uize.Date
module to more easily create logical date ranges.
One particularly useful method of the Uize.Date
module is the Uize.Date.getRangeAround
method, which will generate a "neat" date range of the specified range size around the specified date, such as the week around a specified date, the month around a date, the quarter around a date, the year around a date, etc.
EXAMPLE
page.addChild ('calendar',Uize.Widget.Calendar,Uize.Date.getRangeAround ('','week'));
In the above example, the user will be able to select a date in the current week (i.e. the week of the date on which this calendar widget is instantiated). The result from the call to the Uize.Date.getRangeAround
method is being supplied as the state property values for the Uize.Widget.Calendar
instance. This works because the Uize.Widget.Calendar
class implements minValue
and maxValue
state properties, and because the dateRangeOBJ
value returned by the Uize.Date.getRangeAround
method contains minValue
and maxValue
properties.
1.3.2. Boundless Date Ranges
The minValue
and maxValue
properties are nullable.
This means that either - or both - of the minValue
and maxValue
properties can be set to null
or ''
(empty string), to indicate that there is no lower and/or upper bound, respectively, for the valid date range.
1.3.2.1. Lower Bound Only
When only the minValue
property is set to a date and the maxValue
property is set to null
or ''
(empty string), then there will be no upper bound to the valid date range.
This configuration lets the user select a date from a specified start date onwards. Consider the following examples...
EXAMPLE 1
page.addChild ('calendar',Uize.Widget.Calendar,{minValue:'2000-01-01'});
In the above example, the user will be able to select a date in the 21st century and beyond.
EXAMPLE 2
page.addChild ('calendar',Uize.Widget.Calendar,{minValue:new Date});
In the above example, the user will be able to select a date from today's date (i.e. the date on which this calendar widget is instantiated) onwards.
1.3.2.2. Upper Bound Only
When only the maxValue
property is set to a date and the minValue
property is set to null
or ''
(empty string), then there will be no lower bound to the valid date range.
This configuration lets the user select a date up until a specified date. Consider the following examples...
EXAMPLE 1
page.addChild ('calendar',Uize.Widget.Calendar,{maxValue:'1999-12-31'});
In the above example, the user will be able to select a date in the 20th century or earlier.
EXAMPLE 2
page.addChild ('calendar',Uize.Widget.Calendar,{maxValue:new Date});
In the above example, the user will be able to select a date up until today's date (i.e. the date on which this calendar widget is instantiated).
1.3.2.3. No Lower or Upper Bounds
When both the minValue
and maxValue
properties are set to null
or ''
(empty string), then there will be no restriction on the date that the user can select.
In this case, there will effectively be no valid date range constraint. Put another way, the valid date range will include all dates for all time - completely boundless.
1.3.3. Invalidation of value
The value of the value
state property (i.e. the selected date) may be set to null
, effectively being invalidated, if the values of the minValue
and/or maxValue
state properties are modified and the selected date no longer falls within the newly set valid date range.
1.4. Specifying Date Values
The Uize.Widget.Calendar
module uses the Uize.Date.resolve
static method of the Uize.Date
module to conform date values to instances of JavaScript's Date
object.
This provides flexibility in how dates can be specified when setting values for the value
, minValue
, and maxValue
state properties. Supported value types include: strings in ISO 8601
format, instances of JavaScript's Date
object, date strings that can be parsed by the Date
object, and basically any value type that is supported by the Uize.Date
module's Uize.Date.resolve
method.
1.5. Navigation Buttons
The Uize.Widget.Calendar
module implements support for month and year navigation in the form of navigation buttons.
The navigation button child widgets, which are all button instances, allow the user to navigate the calendar to a different month or year in order to select a date. Month navigation is offered via the nextMonth
and previousMonth
buttons, which are wired to control the value of the month
state property. Year navigation is offered via the nextYear
and previousYear
buttons, which are wired to control the value of the year
state property.
The markup for the navigation button child widgets is optional, and a given implementation of a calendar widget's HTML does not need to offer the navigation buttons in its UI. If the navigation button markup is omitted, the application may elect to provide month and year navigation through some alternate UI. In other cases, a calendar widget's HTML may exclude just the markup for the year navigation buttons, especially in cases where the user is not likely to need to navigate to earlier or later years, or if date selection will be constrained to dates from a particular year.
1.5.1. Navigation Button State Management
The Uize.Widget.Calendar
module manages the enabled
state of the navigation buttons so that they are disabled when their action would take the view outside of a valid date range specified by the minValue
and maxValue
state properties.
When a non-null value is specified for the maxValue state property and incrementing the value of the month state property would take the view outside of the valid date range, then the nextMonth button will be disabled. |
|
When a non-null value is specified for the minValue state property and decrementing the value of the month state property would take the view outside of the valid date range, then the previousMonth button will be disabled. |
|
When a non-null value is specified for the maxValue state property and incrementing the value of the year state property would take the view outside of the valid date range, then the nextYear button will be disabled. |
|
When a non-null value is specified for the minValue state property and decrementing the value of the year state property would take the view outside of the valid date range, then the previousYear button will be disabled. |
1.6. Snap View Behavior
The Uize.Widget.Calendar
module implements a snap-into-view behavior, so that programmatically changing the value of the value
, minValue
, or maxValue
state properties will update the month
and year
state properties - as needed - in order to ensure that the date is in view and that the view is not outside of the valid date range.
The snap view behavior, as it pertains to the value
state property, is switchable with the boolean snapViewOnValueChange
state property. If the snapViewOnValueChange
state property is set to true
at the time that the value
property is modified, then the values of the year
and month
state properties will be updated, if necessary, in order to ensure that the viewed year and month is not outside of the valid date range and that the selected date is in view. If no date is selected, then the year
and month
will be updated so that today's date is in view, unless today's date is outside of the valid date range, in which case the year
and month
will be updated so that the start or end date of the valid date range is in view, with priority given to the start date, but with the end date being used if there is no lower bound to the valid date range.
1.7. Date Grid
The Uize.Widget.Calendar
module implements a date grid, with links for every day of the month, which lets the user select a date.
The HTML for the date grid is dynamically generated to have links for the month of the year currently in view by the instance. The currently selected date is indicated in the grid with a highlight. Days of the month currently in view that are outside of the valid date range are grayed out.
1.8. Examples
There are no dedicated showcase example pages for the Uize.Widget.Calendar
module.
SEARCH FOR EXAMPLES
Use the link below to search for example pages on the UIZE Web site that reference the Uize.Widget.Calendar
module...
SEARCH
1.9. Implementation Info
The Uize.Widget.Calendar
module defines the Uize.Widget.Calendar
class, which is a subclass of Uize.Widget
.
INHERITANCE CHAIN
Uize.Class
−> Uize.Widget
−> Uize.Widget.Calendar
1.9.1. Features Introduced in This Module
The features listed in this section have been introduced in this module.
INSTANCE METHODS
STATE PROPERTIES
dayNameLength
| dayNames
| displayFormat
| maxValue
| minValue
| month
| monthNames
| snapViewOnValueChange
| value
| year
STATIC PROPERTIES
1.9.2. Features Overridden in This Module
The features listed in this section have been overridden in this module.
The module that an overridden feature was initially introduced in will be noted in the IMPLEMENTATION INFO notes for the feature.
INSTANCE METHODS
STATIC PROPERTIES
Uize.Widget.Calendar.moduleName
| Uize.Widget.Calendar.nonInheritableStatics
| Uize.Widget.Calendar.undefined
1.9.3. Features Inherited From Other Modules
The features listed in this section have been inherited from other modules.
The module that an inherited feature was initially introduced in will be noted in the IMPLEMENTATION INFO notes for the feature.
INSTANCE METHODS
addChild
| addChildren
| ajax
| buildHtml
| callInherited
| childHtml
| childId
| confirm
| displayNode
| fire
| flushNodeCache
| get
| getContainer
| getHtml
| getInherited
| getNode
| getNodeStyle
| getNodeValue
| getProvider
| globalizeNode
| inform
| injectNodeHtml
| insertOrWireUi
| insertUi
| is
| isMet
| kill
| localize
| met
| nodeId
| onChange
| once
| removeChild
| removeNode
| removeUi
| set
| setInherited
| setNodeClipRect
| setNodeInnerHtml
| setNodeOpacity
| setNodeProperties
| setNodeStyle
| setNodeValue
| showNode
| toggle
| unmet
| unwire
| unwireNode
| unwireNodeEventsByMatch
| unwireUi
| whenever
| wire
| wireNode
| wireUi
INSTANCE PROPERTIES
STATE PROPERTIES
built
| busy
| busyInherited
| busyParentTickle
| children
| container
| enabled
| enabledInherited
| enabledParentTickle
| html
| idPrefix
| idPrefixConstruction
| insertionMode
| localized
| name
| nodeMap
| parent
| wired
STATIC METHODS
Uize.Widget.Calendar.alphastructor
| Uize.Widget.Calendar.declare
| Uize.Widget.Calendar.doMy
| Uize.Widget.Calendar.dualContextMethods
| Uize.Widget.Calendar.dualContextProperties
| Uize.Widget.Calendar.fire
| Uize.Widget.Calendar.get
| Uize.Widget.Calendar.getBlankImageUrl
| Uize.Widget.Calendar.instanceMethods
| Uize.Widget.Calendar.instanceProperties
| Uize.Widget.Calendar.mixins
| Uize.Widget.Calendar.omegastructor
| Uize.Widget.Calendar.set
| Uize.Widget.Calendar.singleton
| Uize.Widget.Calendar.spawn
| Uize.Widget.Calendar.stateProperties
| Uize.Widget.Calendar.staticMethods
| Uize.Widget.Calendar.staticProperties
| Uize.Widget.Calendar.subclass
| Uize.Widget.Calendar.toggle
| Uize.Widget.Calendar.treeInheritedStateProperties
| Uize.Widget.Calendar.unwire
| Uize.Widget.Calendar.wire
STATIC PROPERTIES
Uize.Widget.Calendar.busyParentTickle
| Uize.Widget.Calendar.enabledParentTickle
| Uize.Widget.Calendar.isWired
| Uize.Widget.Calendar.pathToResources
1.9.4. Modules Directly Under This Namespace
There are no modules directly under this namespace.
1.9.5. Unit Tests
There is no dedicated unit tests module for the Uize.Widget.Calendar
module.
2. DOM Nodes
2.1. day[dayNo]
One of a number of nodes in the date grid that are used to indicate the days of the month of the year currently in view by the instance and that may be wired up to let the user select the corresponding date.
The HTML for these DOM nodes are generated dynamically when the contents of the grid
DOM node is replaced with the updated date grid HTML. The specific day[dayNo]
DOM node that corresponds to the currently selected date will be highlighted. All day[dayNo]
DOM nodes that represent dates that are outside of the valid date range will be grayed out.
NOTES
see the related grid DOM node |
2.2. grid
A node, whose contents will be replaced with the dynamically generated grid HTML for the month of the year currently in view by the instance.
This DOM node can be of any type that can accept HTML contents containing a table. The contents of this node will be replaced when the grid needs to be updated - as a result of the values of the month
or year
properties changing, as a result of the valid date range changing, or as a result of any other state change in the instance that would affect what is displayed in the grid. For more info, see the section Date Grid.
NOTES
see the related day[dayNo] DOM node |
2.3. month DOM Node
A node that is used to display the name of the current month in view (i.e. the value of the month
state property, displayed as a month name).
This DOM node can be of many types: div
, span
, p
, b
, td
, input
, etc. The month name is displayed in this DOM node using the setNodeValue
instance method of the Uize.Widget
base class. Therefore, any features supported by the setNodeValue
method are also supported for this DOM node.
NOTES
the markup for this DOM node is optional | |
see the companion year DOM Node |
2.4. year DOM Node
A node that is used to display the current year in view (i.e. the value of the year
state property).
This DOM node can be of many types: div
, span
, p
, b
, td
, input
, etc. The year is displayed in this DOM node using the setNodeValue
instance method of the Uize.Widget
base class. Therefore, any features supported by the setNodeValue
method are also supported for this DOM node.
NOTES
the markup for this DOM node is optional | |
see the companion month DOM Node |
3. Child Widgets
3.1. nextMonth
A button instance, that is wired up as part of the navigation buttons, and that increments the value of the month
state property.
When a non-null value is specified for the maxValue
state property and incrementing the value of the month
state property would take the view outside of the valid date range, then the nextMonth
button will be disabled (for more info, see the section Navigation Button State Management).
When the month
state property is set to the value 11
(the last month of the year), then incrementing its value will increment the value of the year
state property and set the month
property to 0
. Thus, the nextMonth
button can be used to navigate across years (see Month Wrapping Behavior).
NOTES
the markup for this child widget is optional, and a given implementation of a calendar widget's HTML does not need to offer a nextMonth button |
|
see the companion previousMonth child widget |
|
see the related nextYear and previousYear child widgets |
|
this child widget is added in the constructor |
3.2. nextYear
A button instance, that is wired up as part of the navigation buttons, and that increments the value of the year
state property.
When a non-null value is specified for the maxValue
state property and incrementing the value of the year
state property would take the view outside of the valid date range, then the nextYear
button will be disabled (for more info, see the section Navigation Button State Management).
NOTES
the markup for this child widget is optional, and a given implementation of a calendar widget's HTML does not need to offer a nextYear button |
|
see the companion previousYear child widget |
|
see the related nextMonth and previousMonth child widgets |
|
this child widget is added in the constructor |
3.3. previousMonth
A button instance, that is wired up as part of the navigation buttons, and that decrements the value of the month
state property.
When a non-null value is specified for the minValue
state property and decrementing the value of the month
state property would take the view outside of the valid date range, then the previousMonth
button will be disabled (for more info, see the section Navigation Button State Management).
When the month
state property is set to the value 0
(the first month of the year), then decrementing its value will decrement the value of the year
state property and set the month
property to 11
. Thus, the previousMonth
button can be used to navigate across years (see Month Wrapping Behavior).
NOTES
the markup for this child widget is optional, and a given implementation of a calendar widget's HTML does not need to offer a previousMonth button |
|
see the companion nextMonth child widget |
|
see the related nextYear and previousYear child widgets |
|
this child widget is added in the constructor |
3.4. previousYear
A button instance, that is wired up as part of the navigation buttons, and that decrements the value of the year
state property.
When a non-null value is specified for the minValue
state property and decrementing the value of the year
state property would take the view outside of the valid date range, then the previousYear
button will be disabled (for more info, see the section Navigation Button State Management).
NOTES
the markup for this child widget is optional, and a given implementation of a calendar widget's HTML does not need to offer a previousYear button |
|
see the companion nextYear child widget |
|
see the related nextMonth and previousMonth child widgets |
|
this child widget is added in the constructor |
4. State Properties
4.1. built
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.2. busy
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.3. busyInherited
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.4. busyParentTickle
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.5. children
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.6. container
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.7. dayNameLength
IMPLEMENTATION INFO
this feature was introduced in this module |
4.8. dayNames
IMPLEMENTATION INFO
this feature was introduced in this module |
4.9. displayFormat
IMPLEMENTATION INFO
this feature was introduced in this module |
4.10. enabled
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.11. enabledInherited
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.12. enabledParentTickle
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.13. html
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.14. idPrefix
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.15. idPrefixConstruction
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.16. insertionMode
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.17. localized
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.18. maxValue
An instance of JavaScript's Date
object, representing the latest date that can be selected by the user (i.e. the maximum value for the value
state property).
The maxValue
property specifies the end date of the valid date range represented by the minValue
and maxValue
properties combined (for more info, see the section Valid Date Range).
4.18.1. Flexibility in Specifying Value
When setting the maxValue
property, the date can be specified in a variety of different manners (for more info, see the section Specifying Date Values).
4.18.2. Nullable
The maxValue
property can be set to null
or ''
(empty string), to indicate that there is no upper bound to the valid date range (for more info, see the section Boundless Date Ranges).
4.18.3. Snapping into View
When the maxValue
property is modified, the values of the year
and month
state properties will be updated, if necessary, in order to ensure that the viewed year and month is not outside of the newly set valid date range (for more info, see the section Snap View Behavior).
4.18.4. Value Invalidation
When the maxValue
property is modified, the value
state property may be set to null
if the selected date lies outside of the newly set valid date range (for more info, see the section Invalidation of value).
4.18.5. Updating Navigation Button State
When the value of the maxValue
property is modified, the state of the year and month navigation buttons will be updated, so that buttons will only be enabled if their action would not take the view outside of the newly set valid date range (for more info, see the section Navigation Button State Management).
NOTES
see the companion minValue state property |
|
see also the snapViewOnValueChange state property |
IMPLEMENTATION INFO
this feature was introduced in this module |
4.19. minValue
An instance of JavaScript's Date
object, representing the earliest date that can be selected by the user (i.e. the minimum value for the value
state property).
The minValue
property specifies the start date of the valid date range represented by the minValue
and maxValue
properties combined (for more info, see the section Valid Date Range).
4.19.1. Flexibility in Specifying Value
When setting the minValue
property, the date can be specified in a variety of different manners (for more info, see the section Specifying Date Values).
4.19.2. Nullable
The minValue
property can be set to null
or ''
(empty string), to indicate that there is no lower bound to the valid date range (for more info, see the section Boundless Date Ranges).
4.19.3. Snapping into View
When the minValue
property is modified, the values of the year
and month
state properties will be updated, if necessary, in order to ensure that the viewed year and month is not outside of the newly set valid date range (for more info, see the section Snap View Behavior).
4.19.4. Value Invalidation
When the minValue
property is modified, the value
state property may be set to null
if the selected date lies outside of the newly set valid date range (for more info, see the section Invalidation of value).
4.19.5. Updating Navigation Button State
When the value of the minValue
property is modified, the state of the year and month navigation buttons will be updated, so that buttons will only be enabled if their action would not take the view outside of the newly set valid date range (for more info, see the section Navigation Button State Management).
NOTES
see the companion maxValue state property |
|
see also the snapViewOnValueChange state property |
IMPLEMENTATION INFO
this feature was introduced in this module |
4.20. month
An integer in the range of 0
to 11
, repesenting the month of the year that should be in view in the calendar's UI.
The value of this state property is independent of the selected date that is represented by the value
state property.
4.20.1. Month Wrapping Behavior
The conformer of the month
property supports wrapping when values are specified outside of the range of 0
to 11
.
This makes is possible to increment or decrement the value of this property to effectively navigate across years.
EXAMPLE
myCalendar.set ({year:2009,month:11}); // increment month into next year myCalendar.set ({month:myCalendar.get ('month') + 1}); alert (myCalendar.get ('year')); // displays 2010 alert (myCalendar.get ('month')); // displays 0 // decrement month back into previous year myCalendar.set ({month:myCalendar.get ('month') - 1}); alert (myCalendar.get ('year')); // displays 2009 alert (myCalendar.get ('month')); // displays 11
The wrapping behavior uses a modulus, so you can increment or decrement by any number of months at a time. For instance, the statement myCalendar.set ({month:myCalendar.get ('month') + 18})
would advance the view of the myCalendar
widget a year and a half into the future.
NOTES
see the companion year state property |
|
see the related snapViewOnValueChange and value state properties |
IMPLEMENTATION INFO
this feature was introduced in this module |
4.21. monthNames
IMPLEMENTATION INFO
this feature was introduced in this module |
4.22. name
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.23. nodeMap
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.24. parent
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.25. snapViewOnValueChange
A boolean, specifying whether or not the values of the month
and year
state properties should automatically be set when the value of the value
state property changes.
When this property is set to true
, the month
and year
properties will be automatically set when the value of the value
property changes, to ensure that the newly selected date is in view. In this mode, the values of the month
and year
properties can still be changed so that the currently selected date is not in view, but whenever the value
property is next modified, the month
and year
properties will be "snapped back" to the month and year of the selected date.
NOTES
see the related month , year , and value state properties |
IMPLEMENTATION INFO
this feature was introduced in this module |
4.26. value
An instance of JavaScript's Date
object, representing the currently selected date value for the instance.
When the user selects a date using the instance's user interface, the value
property is updated. When the value
property is modified programmatically, the user interface will be updated to reflect the new value.
4.26.1. Flexibility in Specifying Value
When setting the value
property, the date can be specified in a variety of different manners (for more info, see the section Specifying Date Values).
4.26.2. Nullable
The value
property can be set to null
or ''
(empty string), to indicate that no date has been selected.
4.26.3. Snapping Into View
If the snapViewOnValueChange
state property is set to true
at the time that the value
property is modified, then the values of the year
and month
state properties will be updated as needed in order to ensure that the newly selected date is in view.
For more information on this behavior, see the section Snap View Behavior.
NOTES
see the related minValue and maxValue state properties |
|
see also the snapViewOnValueChange state property |
IMPLEMENTATION INFO
this feature was introduced in this module |
4.27. wired
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
4.28. year
An integer, repesenting the year that should be in view in the calendar's UI.
The value of this state property is independent of the selected date that is represented by the value
state property.
NOTES
see the companion month state property |
|
see the related snapViewOnValueChange and value state properties |
IMPLEMENTATION INFO
this feature was introduced in this module |
5. Instance Methods
5.1. addChild
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.2. addChildren
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.3. ajax
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.4. buildHtml
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.5. callInherited
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.6. childHtml
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.7. childId
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.8. confirm
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.9. displayNode
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.10. fire
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
5.11. flushNodeCache
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.12. get
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
5.13. getContainer
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.14. getCustomDateUi
IMPLEMENTATION INFO
this feature was introduced in this module |
5.15. getHtml
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.16. getInherited
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.17. getNode
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.18. getNodeStyle
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.19. getNodeValue
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.20. getProvider
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.21. globalizeNode
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.22. inform
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.23. injectNodeHtml
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.24. insertOrWireUi
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.25. insertUi
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.26. is
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
5.27. isMet
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
5.28. kill
Inherited from Uize.Widget
, but introduced in Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Class ) |
5.29. localize
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.30. met
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
5.31. nodeId
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.32. onChange
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
5.33. once
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
5.34. removeChild
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.35. removeNode
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.36. removeUi
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.37. set
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
5.38. setInherited
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.39. setNodeClipRect
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.40. setNodeInnerHtml
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.41. setNodeOpacity
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.42. setNodeProperties
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.43. setNodeStyle
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.44. setNodeValue
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.45. showNode
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.46. toggle
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
5.47. unmet
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
5.48. unwire
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
5.49. unwireNode
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.50. unwireNodeEventsByMatch
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.51. unwireUi
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.52. updateUi
IMPLEMENTATION INFO
this is an override of an inherited feature (implementation is in this module, first introduced in Uize.Widget ) |
5.53. valueOf
this is an override of an inherited feature (implementation is in this module, first introduced in Uize.Class ) |
IMPLEMENTATION INFO
5.54. whenever
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
5.55. wire
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
5.56. wireNode
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
5.57. wireUi
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
6. Instance Properties
6.1. showConfirm
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
6.2. showInform
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
7. Static Methods
7.1. Uize.Widget.Calendar.alphastructor
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.2. Uize.Widget.Calendar.declare
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.3. Uize.Widget.Calendar.doMy
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.4. Uize.Widget.Calendar.dualContextMethods
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.5. Uize.Widget.Calendar.dualContextProperties
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.6. Uize.Widget.Calendar.fire
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.7. Uize.Widget.Calendar.get
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.8. Uize.Widget.Calendar.getBlankImageUrl
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
|
this static feature is inherited by subclasses |
7.9. Uize.Widget.Calendar.instanceMethods
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.10. Uize.Widget.Calendar.instanceProperties
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.11. Uize.Widget.Calendar.mixins
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.12. Uize.Widget.Calendar.omegastructor
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.13. Uize.Widget.Calendar.set
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.14. Uize.Widget.Calendar.singleton
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.15. Uize.Widget.Calendar.spawn
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
|
this static feature is inherited by subclasses |
7.16. Uize.Widget.Calendar.stateProperties
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.17. Uize.Widget.Calendar.staticMethods
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.18. Uize.Widget.Calendar.staticProperties
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.19. Uize.Widget.Calendar.subclass
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.20. Uize.Widget.Calendar.toggle
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.21. Uize.Widget.Calendar.treeInheritedStateProperties
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
|
this static feature is inherited by subclasses |
7.22. Uize.Widget.Calendar.unwire
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
7.23. Uize.Widget.Calendar.wire
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
8. Static Properties
8.1. Uize.Widget.Calendar.busyParentTickle
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
|
this static feature is inherited by subclasses |
8.2. Uize.Widget.Calendar.enabledParentTickle
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
|
this static feature is inherited by subclasses |
8.3. Uize.Widget.Calendar.isWired
Inherited from Uize.Widget
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Widget , first introduced in Uize.Widget ) |
|
this static feature is inherited by subclasses |
8.4. Uize.Widget.Calendar.moduleName
IMPLEMENTATION INFO
this is an override of an inherited feature (implementation is in this module, first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
8.5. Uize.Widget.Calendar.nonInheritableStatics
IMPLEMENTATION INFO
this is an override of an inherited feature (implementation is in this module, first introduced in Uize.Class ) |
|
this static feature is not inherited by subclasses |
8.6. Uize.Widget.Calendar.pathToResources
Inherited from Uize.Class
.
IMPLEMENTATION INFO
this is an inherited feature (implementation is in Uize.Class , first introduced in Uize.Class ) |
|
this static feature is inherited by subclasses |
8.7. Uize.Widget.Calendar.undefined
IMPLEMENTATION INFO
this is an override of an inherited feature (implementation is in this module, first introduced in Uize.Widget ) |
|
this static feature is inherited by subclasses |
8.8. Uize.Widget.Calendar.useV2CssClasses
IMPLEMENTATION INFO
this feature was introduced in this module | |
this static feature is inherited by subclasses |