DatePickerDialog

Examples

main.layout.xml
<?xml version="1.0" encoding="UTF-8"?>
<RemoteUILayout xmlns="urn:remoteui:org:layout">    
  <Dialogs>
    <DatePickerDialog id="datePicker" accentColor="@{highlightColor}"
        title="Please select a date." date="#{date}" minDate="#{minDate}" />
  </Dialogs>
  <Button text="Show Date Picker" onClick="#{showDialog('datePicker')}" />
</RemoteUILayout>

Java
private ZonedDateTime zonedDate;

public GregorianCalendar getDate() {
	return GregorianCalendar.from(zonedDate);
}

public void setDate(GregorianCalendar date) {
	zonedDate = date.toZonedDateTime();
	//TODO - react on this user input
}

public Calendar getMinDate() {
	return Calendar.getInstance();
}

Attributes

Name Type Default Binding Description

Inherits all attributes from View and adds the following:

id

idType

The id of the dialog to reference it in the startDialog(String id) method

date

GregorianCalendar

now

input/output

The selected date within the DatePicker

minDate

GregorianCalendar

output

The minimum selectable date

maxDate

GregorianCalendar

output

The maximum selectable date

highlightedDates

list of GregorianCalendar

output

A list of dates that are highlighted in the picker

selectableDates

list of GregorianCalendar

output

If set, the picker limits the selectable dates to this list

accentColor

color

output

The color that is used to tint the picker dialog

title

string

output

The title of the picker displayed on top of it

okText

string

output

The text on the OK button

cancelText

string

output

The text on the cancel button

onOk

expression

input

Action binding for the OK button

onCancel

expression

input

Action binding for the cancel button

results matching ""

    No results matching ""