Date picker component for dart and polymer

Fires select-date-changed when selected date changes.

Example:

<date-picker 
    select-date="{{myDateTimeField}}"
    label="Select a date"
    date-format="yyyy-MM-dd"
    dateonly="true">
</date-picker>
Inheritance
  • Object
  • DartHtmlDomObject
  • EventTarget
  • Node
  • Element
  • HtmlElement
  • PolymerElement
  • DatePicker
Mixes-in
  • Observable
  • PolymerAutoNotifySupportJsBehavior
  • PolymerAutoNotifySupportBehavior
Annotations
  • PolymerRegister('date-picker')

Constructors

DatePicker.created()

Properties

$ → JsObject

The underlying Js Element's $ property.

read-only, inherited
attributes → Map<String, String>

All attributes on this element.

read / write, inherited
baseUri → String

read-only, inherited
behaviors → JsArray<JsObject>

The underlying behaviors list created for this element.

read-only, inherited

The underlying JS DOM object.

read / write, inherited
borderEdge → CssRect

Access the dimensions and position of this element's content + padding + border box.

read-only, inherited
changes → Stream<List<ChangeRecord>>

The stream of change records to this object. Records will be delivered asynchronously.

read-only, inherited
childNodes → List<Node>

A list of this node's children.

read-only, inherited
children → List<Element>

List of the direct children of this element.

read / write, inherited
classes → CssClassSet

The set of CSS classes applied to this element.

read / write, inherited
className → String

read / write, inherited
client → Rectangle

Gets the position of this element relative to the client area of the page.

read-only, inherited
clientHeight → int

read-only, inherited
clientLeft → int

read-only, inherited
clientTop → int

read-only, inherited
clientWidth → int

read-only, inherited
contentEdge → CssRect

Access this element's content position.

read-only, inherited
contentEditable → String

read / write, inherited
contextMenu → MenuElement

read / write, inherited
currentDate → DateTime

read / write
customStyle → JsObject

read-only, inherited
dataset → Map<String, String>

Allows access to all custom data attributes (data-*) set on this element.

read / write, inherited
dateFormat → String

The date format (default: locale for DateFormat.yMd)

read / write
dateonly → bool

A flag to select only date without time info (default: false)

read / write
dir → String

read / write, inherited
disabled → bool

A flag to enable / disable this field

read / write
documentOffset → Point

Provides the coordinates of the element relative to the top of the document.

read-only, inherited
domHost → Element

Return the element whose local dom within which this element is contained. This is a shorthand for Polymer.dom(this).getOwnerRoot().host.

read-only, inherited
draggable → bool

read / write, inherited
dropzone → String

read / write, inherited
firstChild → Node

The first child of this node.

read-only, inherited
firstWeek Week

read / write
format → DateFormat

read / write
halign → String

read / write
hashCode → int

read-only, inherited
hasObservers → bool

True if this object has any observers, and should call notifyChange for changes.

read-only, inherited
hidden → bool

read / write, inherited
id → String

read / write, inherited
innerHtml → String

Parses the HTML fragment and sets it as the contents of this element.

read / write, inherited
inputMethodContext → InputMethodContext

read-only, inherited
isBadUpgrade → bool

Required for SDK Infrastructure. Internal use only.

read-only, inherited
isContentEditable → bool

read-only, inherited
js → dynamic

read / write, inherited
jsElement → JsObject

read-only, inherited
label → String

Label displayed in the field

read / write
lang → String

read / write, inherited
lastChild → Node

The last child of this node.

read-only, inherited
listeners → JsObject

The underlying listeners object created for this element.

read-only, inherited
localName → String

read-only, inherited
marginEdge → CssRect

Access the dimensions and position of this element's content + padding + border + margin box.

read-only, inherited
month → List<Week>

read / write
monthDateFormat → DateFormat

read / write
monthYear → String

read / write
namespaceUri → String

A URI that identifies the XML namespace of this element.

read-only, inherited
nextElementSibling → Element

read-only, inherited
nextNode → Node

The next sibling node.

read-only, inherited
nodeName → String

The name of this node.

read-only, inherited
nodes → List<Node>

A modifiable list of this node's children.

read / write, inherited
nodeType → int

The type of node.

read-only, inherited
nodeValue → String

The value of this node.

read-only, inherited
offset → Rectangle

Gets the offset of this element relative to its offsetParent.

read-only, inherited
offsetHeight → int

read-only, inherited
offsetLeft → int

read-only, inherited
offsetParent → Element

read-only, inherited
offsetTop → int

read-only, inherited
offsetWidth → int

read-only, inherited
on → ElementEvents

This is an ease-of-use accessor for event streams which should only be used when an explicit accessor is not available.

read-only, inherited
onAbort → ElementStream<Event>

read-only, inherited
onBeforeCopy → ElementStream<Event>

Stream of beforecopy events handled by this Element.

read-only, inherited
onBeforeCut → ElementStream<Event>

Stream of beforecut events handled by this Element.

read-only, inherited
onBeforePaste → ElementStream<Event>

Stream of beforepaste events handled by this Element.

read-only, inherited
onBlur → ElementStream<Event>

read-only, inherited
onCanPlay → ElementStream<Event>

read-only, inherited
onCanPlayThrough → ElementStream<Event>

read-only, inherited
onChange → ElementStream<Event>

read-only, inherited
onClick → ElementStream<MouseEvent>

read-only, inherited
onContextMenu → ElementStream<MouseEvent>

read-only, inherited
onCopy → ElementStream<Event>

Stream of copy events handled by this Element.

read-only, inherited
onCut → ElementStream<Event>

Stream of cut events handled by this Element.

read-only, inherited
onDoubleClick → ElementStream<Event>

read-only, inherited
onDrag → ElementStream<MouseEvent>

read-only, inherited
onDragEnd → ElementStream<MouseEvent>

read-only, inherited
onDragEnter → ElementStream<MouseEvent>

read-only, inherited
onDragLeave → ElementStream<MouseEvent>

read-only, inherited
onDragOver → ElementStream<MouseEvent>

read-only, inherited
onDragStart → ElementStream<MouseEvent>

read-only, inherited
onDrop → ElementStream<MouseEvent>

read-only, inherited
onDurationChange → ElementStream<Event>

read-only, inherited
onEmptied → ElementStream<Event>

read-only, inherited
onEnded → ElementStream<Event>

read-only, inherited
onError → ElementStream<Event>

read-only, inherited
onFocus → ElementStream<Event>

read-only, inherited
onFullscreenChange → ElementStream<Event>

Stream of fullscreenchange events handled by this Element.

read-only, inherited
onFullscreenError → ElementStream<Event>

Stream of fullscreenerror events handled by this Element.

read-only, inherited
onInput → ElementStream<Event>

read-only, inherited
onInvalid → ElementStream<Event>

read-only, inherited
onKeyDown → ElementStream<KeyboardEvent>

read-only, inherited
onKeyPress → ElementStream<KeyboardEvent>

read-only, inherited
onKeyUp → ElementStream<KeyboardEvent>

read-only, inherited
onLoad → ElementStream<Event>

read-only, inherited
onLoadedData → ElementStream<Event>

read-only, inherited
onLoadedMetadata → ElementStream<Event>

read-only, inherited
onMouseDown → ElementStream<MouseEvent>

read-only, inherited
onMouseEnter → ElementStream<MouseEvent>

read-only, inherited
onMouseLeave → ElementStream<MouseEvent>

read-only, inherited
onMouseMove → ElementStream<MouseEvent>

read-only, inherited
onMouseOut → ElementStream<MouseEvent>

read-only, inherited
onMouseOver → ElementStream<MouseEvent>

read-only, inherited
onMouseUp → ElementStream<MouseEvent>

read-only, inherited
onMouseWheel → ElementStream<WheelEvent>

read-only, inherited
onPaste → ElementStream<Event>

Stream of paste events handled by this Element.

read-only, inherited
onPause → ElementStream<Event>

read-only, inherited
onPlay → ElementStream<Event>

read-only, inherited
onPlaying → ElementStream<Event>

read-only, inherited
onRateChange → ElementStream<Event>

read-only, inherited
onReset → ElementStream<Event>

read-only, inherited
onResize → ElementStream<Event>

read-only, inherited
onScroll → ElementStream<Event>

read-only, inherited
onSearch → ElementStream<Event>

Stream of search events handled by this Element.

read-only, inherited
onSeeked → ElementStream<Event>

read-only, inherited
onSeeking → ElementStream<Event>

read-only, inherited
onSelect → ElementStream<Event>

read-only, inherited
onSelectDate → Stream<CustomEvent>

read-only
onSelectStart → ElementStream<Event>

Stream of selectstart events handled by this Element.

read-only, inherited
onStalled → ElementStream<Event>

read-only, inherited
onSubmit → ElementStream<Event>

read-only, inherited
onSuspend → ElementStream<Event>

read-only, inherited
onTimeUpdate → ElementStream<Event>

read-only, inherited
onTouchCancel → ElementStream<TouchEvent>

Stream of touchcancel events handled by this Element.

read-only, inherited
onTouchEnd → ElementStream<TouchEvent>

Stream of touchend events handled by this Element.

read-only, inherited
onTouchEnter → ElementStream<TouchEvent>

Stream of touchenter events handled by this Element.

read-only, inherited
onTouchLeave → ElementStream<TouchEvent>

Stream of touchleave events handled by this Element.

read-only, inherited
onTouchMove → ElementStream<TouchEvent>

Stream of touchmove events handled by this Element.

read-only, inherited
onTouchStart → ElementStream<TouchEvent>

Stream of touchstart events handled by this Element.

read-only, inherited
onTransitionEnd → ElementStream<TransitionEvent>

Stream of transitionend events handled by this Element.

read-only, inherited
onVolumeChange → ElementStream<Event>

read-only, inherited
onWaiting → ElementStream<Event>

read-only, inherited
outerHtml → String

read-only, inherited
ownerDocument → Document

The document this node belongs to.

read-only, inherited
paddingEdge → CssRect

Access the dimensions and position of this element's content + padding box.

read-only, inherited
parent → Element

The parent element of this node.

read-only, inherited
parentNode → Node

The parent node of this node.

read-only, inherited
pickerOpen → bool

read / write
previousElementSibling → Element

read-only, inherited
previousNode → Node

The previous sibling node.

read-only, inherited
properties → JsObject

The underlying properties object created for this element.

read-only, inherited
required → bool

A flag for field validation

read / write
root → Node

The shady or shadow root for this element.

read-only, inherited
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited
scrollHeight → int

read-only, inherited
scrollLeft → int

read / write, inherited
scrollTop → int

read / write, inherited
scrollWidth → int

read-only, inherited
selectedDate → DateTime

Current selected date, bindable r/w, notify.

read / write
shadowRoot → ShadowRoot

read-only, inherited
spellcheck → bool

read / write, inherited
style → CssStyleDeclaration

read-only, inherited
tabIndex → int

read / write, inherited
tagName → String

read-only, inherited
text → String

All text within this node and its decendents.

read / write, inherited
textDate → String

Text version of the date bindable, r/w

read / write
title → String

read / write, inherited
translate → bool

read / write, inherited
valign → String

read / write
xtag → dynamic

Experimental support for web components. This field stores a reference to the component implementation. It was inspired by Mozilla's x-tags project. Please note: in the future it may be possible to extend Element from your class, in which case this field will be deprecated.

read / write, inherited

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

$$(String selector) → Element

Convenience method to run querySelector on this local DOM scope. This function calls Polymer.dom(this.root).querySelector(slctr).

inherited
add(String path, item) → void

Add item to a list at path.

inherited
addAll(String path, Iterable items) → void

Add items to a list at path.

inherited
addEventListener(String type, dynamic listener(Event event), [bool useCapture]) → void

inherited
animate(Iterable<Map<String, dynamic>> frames, [timing]) → AnimationPlayer

Creates a new AnimationEffect object whose target element is the object on which the method is called, and calls the play() method of the AnimationTimeline object of the document timeline of the node document of the element, passing the newly created AnimationEffect as the argument to the method. Returns an AnimationPlayer for the effect.

inherited
append(Node newChild) → Node

Adds a node to the end of the child nodes list of this node.

inherited
appendHtml(String text, {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) → void

Parses the specified text as HTML and adds the resulting node after the last child of this element.

inherited
appendText(String text) → void

Adds the specified text after the last child of this element.

inherited
async(void callback(), {int waitTime}) → int

Runs a callback function asyncronously.

inherited
attached() → void

Called by the DOM when this element has been inserted into the live document.

attributeChanged(String name, String oldValue, String newValue) → void

Called by the DOM whenever an attribute on this has been changed.

inherited
attributeFollows(String name, Element toElement, Element fromElement) → void

Removes an HTML attribute from one node, and adds it to another.

inherited
blur() → void

inherited
cancelAsync(int handle) → void

Cancels an async operation started with async.

inherited
cancelClose([_, __]) → void

cancelDebouncer(String jobName) → void

Cancels an active debouncer. The callback will not be called.

inherited
changeDateFormat([_, __]) → void

classFollows(String name, Element toElement, Element fromElement) → void

Removes a class from one node, and adds it to another.

inherited
clear(String path) → void

Remove all items from a list at path.

inherited
click() → void

inherited
clone(bool deep) → Node

Returns a copy of this node.

inherited
computeDay(Day day) → String

computeDayClass(bool selected, bool other, bool today) → String

computeInputClass(bool dateonly) → String

computeMillisecondsSinceEpoch(Day day) → String

computeMothYear([_]) → void

contains(Node other) → bool

Returns true if this node contains the specified node.

inherited
create(String tag, Map props) → Element

Convenience method for creating an element and configuring it.

inherited
createFragment(String html, {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) → DocumentFragment

Create a DocumentFragment from the HTML fragment and ensure that it follows the sanitization rules specified by the validator or treeSanitizer.

inherited
createShadowRoot() → ShadowRoot

inherited
currentDateChanged([_, __]) → void

debounce(String jobName, void callback(), {int waitTime}) → void

Call debounce to collapse multiple requests for a named task into one invocation which is made after the wait time has elapsed with no new request. If no wait time is given, the callback will be called at microtask timing (guaranteed before paint).

inherited
deliverChanges() → bool

Synchronously deliver pending changes. Returns true if any records were delivered, otherwise false.

inherited
detached() → void

Called by the DOM when this element has been removed from the live document.

dispatchEvent(Event event) → bool

inherited
distributeContent() → void

Force this element to distribute its children to its local dom. A user should call distributeContent if distribution has been invalidated due to changes to selectors on child elements that effect distribution that were not made via Polymer.dom. For example, if an element contains an insertion point with <content select=".foo"> and a foo class is added to a child, then distributeContent must be called to update local dom distribution.

inherited
doPos(Event e, detail) → void

elementMatches(String selector, Element node) → bool

Polyfill for Element.prototype.matches, which is sometimes still prefixed.

inherited
enteredView() → void

Deprecated*: override attached instead.

inherited
fillRange(String path, int start, int end, [fillValue]) → void

Sets the objects in the range start inclusive to end exclusive to the given fillValue on the list at path.

inherited
fire(String type, {detail, bool canBubble: true, bool cancelable: true, Node node}) → CustomEvent

Dispatches a custom event with an optional detail object.

inherited
flushDebouncer(String jobName) → void

Immediately calls the debouncer callback and inactivates it.

inherited
focus() → void

inherited
get(String path, [root]) → dynamic

Gets a value at path for the root object. The root defaults to this. The root must be a JsProxy or PolymerElement object.

inherited
getAnimationPlayers() → List<AnimationPlayer>

inherited
getAttribute(String name) → String

inherited
getAttributeNS(String namespaceURI, String localName) → String

inherited
getBoundingClientRect() → Rectangle

Returns the smallest bounding rectangle that encompasses this element's padding, scrollbar, and border.

inherited
getClientRects() → List<Rectangle>

Returns a list of bounding rectangles for each box associated with this element.

inherited
getComputedStyle([String pseudoElement]) → CssStyleDeclaration

The set of all CSS values applied to this element, including inherited and default values.

inherited
getContentChildNodes([String selector]) → List<Node>

Returns a list of nodes distributed to this element's <content>.

inherited
getContentChildren([String selector]) → List<Element>

Returns a list of element children distributed to this element's <content>.

inherited
getDestinationInsertionPoints() → List<Node>

Returns a list of shadow DOM insertion points to which this element is distributed.

inherited
getEffectiveChildNodes() → List<Node>

Returns a list of nodes that are the effective childNodes. The effective childNodes list is the same as the element's childNodes except that any <content> elements are replaced with the list of nodes distributed to the <content>, the result of its getDistributedNodes method.

inherited
getEffectiveChildren() → List<Element>

Returns a list of elements that are the effective children. The effective children list is the same as the element's children except that any <content> elements are replaced with the list of elements distributed to the <content>.

inherited
getEffectiveText() → String

Returns a string of text content that is the concatenation of the text content's of the element's effective childNodes (the elements returned by getEffectiveChildNodes.

inherited
getElementsByClassName(String classNames) → List<Node>

Returns a list of nodes with the given class name inside this element.

inherited
getNamespacedAttributes(String namespace) → Map<String, String>

Gets a map for manipulating the attributes of a particular namespace.

inherited
getPropertyInfo(String property) → JsObject

Returns a property descriptor object for the property specified.

inherited
hasChildNodes() → bool

Returns true if this node has any children.

inherited
importHref(String href, {void onLoad(e), void onError(e)}) → LinkElement

Convenience method for importing an HTML document imperatively.

inherited
inputLeft([_, __]) → void

insert(String path, int index, element) → void

Inserts element at position index to the list at path.

inherited
insertAdjacentElement(String where, Element element) → Element

inherited
insertAdjacentHtml(String where, String html, {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) → void

Parses text as an HTML fragment and inserts it into the DOM at the specified location.

inherited
insertAdjacentText(String where, String text) → void

inherited
insertAll(String path, int index, Iterable elements) → void

Inserts elements at position index to the list at path.

inherited
insertAllBefore(Iterable<Node> newNodes, Node refChild) → Node

Inserts all of the nodes into this node directly before refChild.

inherited
insertBefore(Node newChild, Node refChild) → Node

Inserts all of the nodes into this node directly before refChild.

inherited
instanceTemplate(TemplateElement template) → DocumentFragment

Calls importNode on the content of the template specified and returns a document fragment containing the imported content.

inherited
isDebouncerActive(String jobName) → bool

Returns whether a named debouncer is active.

inherited
isLightDescendant(Element node) → bool

Checks whether an element is in this element's light DOM tree.

inherited
isLocalDescendant(Element node) → bool

Checks whether an element is in this element's local DOM tree.

inherited
leftView() → void

Deprecated*: override detached instead.

inherited
linkPaths(String to, String from) → void

Aliases one data path as another, such that path notifications from one are routed to the other.

inherited
listen(Element node, String eventName, String methodName) → void

Convenience method to add an event listener on a given element, late bound to a named method on this element.

inherited
matches(String selectors) → bool

inherited
matchesWithAncestors(String selectors) → bool

Checks if this element or any of its parents match the CSS selectors.

inherited
nextMonth([_, __]) → void

noSuchMethod(Invocation invocation) → dynamic

noSuchMethod is invoked when users invoke a non-existent method on an object. The name of the method and the arguments of the invocation are passed to noSuchMethod in an Invocation. If noSuchMethod returns a value, that value becomes the result of the original invocation.

inherited
notifyChange(ChangeRecord record) → void

Notify observers of a change.

inherited
notifyPath(String path, value, {fromAbove: false}) → void

Notify that a value at a path has been changed.

inherited
notifyPropertyChange(String field, Object oldValue, Object newValue) → dynamic

Notify that the field name of this object has been changed.

inherited
offsetTo(Element parent) → Point

Provides the offset of this element's borderEdge relative to the specified parent.

inherited
pickerOpened() → void

polymerCreated() → void

inherited
prevMonth([_, __]) → void

query(String relativeSelectors) → Element

Alias for querySelector. Note this function is deprecated because its semantics will be changing in the future.

inherited
queryAll(String relativeSelectors) → ElementList<Element>

Alias for querySelectorAll. Note this function is deprecated because its semantics will be changing in the future.

inherited
queryAllEffectiveChildren(String selector) → List<Element>

inherited
queryEffectiveChildren(String selector) → Element

inherited
querySelector(String selectors) → Element

Finds the first descendant element of this element that matches the specified group of selectors.

inherited
querySelectorAll(String selectors) → ElementList<Element>

Finds all descendent elements of this element that match the specified group of selectors.

inherited
reflectPropertyToAttribute(String name) → void

Serializes a property to its associated attribute.

inherited
remove() → void

Removes this node from the DOM.

inherited
removeAt(String path, int index) → dynamic

Removes the item at index from the list at path. Returns the removed element.

inherited
removeEventListener(String type, dynamic listener(Event event), [bool useCapture]) → void

inherited
removeItem(String path, value) → bool

Removes the first occurrence of value from the list at path. Returns true if value was in the list, false otherwise. Note: Renamed from remove because that conflicts with HtmlElement.remove.

inherited
removeLast(String path) → dynamic

Removes the last from the list at path. Returns the removed element.

inherited
removeRange(String path, int start, int end) → void

Removes the objects in the range start inclusive to end exclusive from the list at path.

inherited
removeWhere(String path, bool test(element)) → void

Removes all objects from the list at path that satisfy test. TODO(jakemac): Optimize by removing whole ranges?

inherited
replaceRange(String path, int start, int end, Iterable replacement) → void

Removes the objects in the range start inclusive to end exclusive and inserts the contents of replacement in its place for the list at path.

inherited
replaceWith(Node otherNode) → Node

Replaces this node with another node.

inherited
requestFullscreen() → void

inherited
requestPointerLock() → void

inherited
retainWhere(String path, bool test(element)) → void

Removes all objects from the list at path that fail to satisfy test.

inherited
scopeSubtree(Element container, bool shouldObserve) → void

Apply style scoping to the specified container and all its descendants. If shoudlObserve is true, changes to the container are monitored via mutation observer and scoping is applied.

inherited
scrollIntoView([ScrollAlignment alignment]) → void

Scrolls this element into view.

inherited
selDate(Event evt, detail) → void

selectedDateChanged([_]) → void

serializeValueToAttribute(value, String attribute, [Element node]) → void

Sets a typed value to an HTML attribute on a node.

inherited
set(String path, value) → void

Sets a value on an attribute path, and notifies of changes.

inherited
setAll(String path, int index, Iterable iterable) → void

Overwrites objects in the list at path with the objects of iterable, starting at position index in this list.

inherited
setAttribute(String name, String value) → void

inherited
setAttributeNS(String namespaceURI, String qualifiedName, String value) → void

inherited
setInnerHtml(String html, {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) → void

Parses the HTML fragment and sets it as the contents of this element. This ensures that the generated content follows the sanitization rules specified by the validator or treeSanitizer.

inherited
setRange(String path, int start, int end, Iterable iterable, [int skipCount = 0]) → void

Copies the objects of iterable, skipping skipCount objects first, into the range start, inclusive, to end, exclusive, of the list at path.

inherited
setScrollDirection([String direction = 'all', Element node]) → void

Override scrolling behavior to all direction, one direction, or none.

inherited
showPicker([_, __]) → void

textDateChanged([_]) → void

toggleAttribute(String name, [bool value, Element node]) → void

Toggles an HTML attribute on or off.

inherited
toggleClass(String name, [bool value, Element node]) → void

Toggles a CSS class on or off.

inherited
toString() → String

The string representation of this element.

inherited
transform(String transform, [Element node]) → void

Cross-platform helper for setting an element's CSS transform property.

inherited
translate3d(String x, String y, String z, [Element node]) → void

Cross-platform helper for setting an element's CSS translate3d property.

inherited
unlinkPaths(String path) → void

Removes a data path alias previously established with linkPaths.

inherited
updateRequired(_) → void

updateStyles() → void

Re-evaluates and applies custom CSS properties based on dynamic changes to this element's scope, such as adding or removing classes in this element's local DOM.

inherited