All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.fluorumlabs.disconnect.vaadin.elements.DatePickerElement Maven / Gradle / Ivy

The newest version!
package com.github.fluorumlabs.disconnect.vaadin.elements;

import com.github.fluorumlabs.disconnect.core.annotations.Import;
import com.github.fluorumlabs.disconnect.core.annotations.NpmPackage;
import com.github.fluorumlabs.disconnect.polymer.elements.mixins.GestureEventListeners;
import com.github.fluorumlabs.disconnect.vaadin.Vaadin;
import com.github.fluorumlabs.disconnect.vaadin.elements.mixins.ControlStateMixin;
import com.github.fluorumlabs.disconnect.vaadin.elements.mixins.DatePickerMixin;
import com.github.fluorumlabs.disconnect.vaadin.elements.mixins.ElementMixin;
import com.github.fluorumlabs.disconnect.vaadin.elements.mixins.ThemableMixin;
import js.web.dom.HTMLElement;
import org.teavm.jso.JSProperty;

import javax.annotation.Nullable;

/**
 * <vaadin-date-picker> is a date selection field which includes a scrollable
 * month calendar view.
 *
 * 
<vaadin-date-picker label="Birthday"></vaadin-date-picker>
 * 
*
datePicker.value = '2016-03-02';
 * 
* When the selected value is changed, a value-changed event is triggered. * *

Styling

* The following shadow DOM parts are available for styling: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Part nameDescriptionTheme for Element
text-fieldInput elementvaadin-date-picker
clear-buttonClear buttonvaadin-date-picker
toggle-buttonToggle buttonvaadin-date-picker
overlay-contentThe overlay elementvaadin-date-picker
overlay-headerFullscreen mode * headervaadin-date-picker-overlay-content
labelFullscreen mode value/labelvaadin-date-picker-overlay-content
clear-buttonFullscreen mode clear * buttonvaadin-date-picker-overlay-content
toggle-buttonFullscreen mode toggle * buttonvaadin-date-picker-overlay-content
years-toggle-buttonFullscreen mode years scroller * togglevaadin-date-picker-overlay-content
monthsMonths scrollervaadin-date-picker-overlay-content
yearsYears scrollervaadin-date-picker-overlay-content
toolbarFooter bar with buttonsvaadin-date-picker-overlay-content
today-buttonToday buttonvaadin-date-picker-overlay-content
cancel-buttonCancel buttonvaadin-date-picker-overlay-content
monthMonth calendarvaadin-date-picker-overlay-content
year-numberYear numbervaadin-date-picker-overlay-content
year-separatorYear separatorvaadin-date-picker-overlay-content
month-headerMonth titlevaadin-month-calendar
weekdaysWeekday containervaadin-month-calendar
weekdayWeekday elementvaadin-month-calendar
week-numbersWeek numbers containervaadin-month-calendar
week-numberWeek number elementvaadin-month-calendar
dateDate elementvaadin-month-calendar
* See * ThemableMixin – how to apply styles for shadow parts *

* The following state attributes are available for styling: * *

* * * * * * * * * * * * * *
AttributeDescriptionPart name
invalidSet when the element is invalid:host
openedSet when the date selector overlay is opened:host
readonlySet when the element is readonly:host
disabledSet when the element is disabled:host
todaySet on the date corresponding to the current daydate
focusedSet on the focused datedate
disabledSet on the date out of the allowed rangedate
selectedSet on the selected datedate
* If you want to replace the default input field with a custom implementation, you should use the * <vaadin-date-picker-light> element. *

* In addition to <vaadin-date-picker> itself, the following internal * components are themable: * *

    *
  • <vaadin-text-field>
  • *
  • <vaadin-date-picker-overlay>
  • *
  • <vaadin-date-picker-overlay-content>
  • *
  • <vaadin-month-calendar>
  • *
* Note: the theme attribute value set on <vaadin-date-picker> is * propagated to the internal themable components listed above. */ @NpmPackage( name = "@vaadin/vaadin", version = Vaadin.VERSION ) @Import( module = "@vaadin/vaadin-date-picker/theme/lumo/vaadin-date-picker.js" ) public interface DatePickerElement extends HTMLElement, ElementMixin, ControlStateMixin, ThemableMixin, DatePickerMixin, GestureEventListeners { static String TAGNAME() { return "vaadin-date-picker"; } /** * Set to true to display the clear icon which clears the input. */ @JSProperty boolean isClearButtonVisible(); /** * Set to true to display the clear icon which clears the input. */ @JSProperty void setClearButtonVisible(boolean clearButtonVisible); /** * Set to true to disable this element. */ @JSProperty boolean isDisabled(); /** * Set to true to disable this element. */ @JSProperty void setDisabled(boolean disabled); /** * The error message to display when the input is invalid. */ @Nullable @JSProperty String getErrorMessage(); /** * The error message to display when the input is invalid. */ @JSProperty void setErrorMessage(String errorMessage); /** * A placeholder string in addition to the label. If this is set, the label will always float. */ @Nullable @JSProperty String getPlaceholder(); /** * A placeholder string in addition to the label. If this is set, the label will always float. */ @JSProperty void setPlaceholder(String placeholder); /** * Set to true to make this element read-only. */ @JSProperty boolean isReadonly(); /** * Set to true to make this element read-only. */ @JSProperty void setReadonly(boolean readonly); /** * This property is set to true when the control value invalid. */ @JSProperty boolean isInvalid(); /** * This property is set to true when the control value invalid. */ @JSProperty void setInvalid(boolean invalid); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy