java.lang.Object | |
↳ | com.sap.cloud.mobile.fiori.formcell.DateTimePicker |
Customized DateTimePicker control which contains TextView and a Date/Time Dialog. The user can
click the view to display a popup dialog having Date/Time Picker Dialog.
Developer can choose the mode for the control setDateTimePickerMode(DateTimePickerMode)
. The default mode is DATE_TIME_PICKER. By default, the user's locale date and time format will
be used to show the date and time value.
Structure of the control :
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
enum | DateTimePicker.DateTimePickerMode | DateTimePickerMode controls the kind of value selection dialogs are presented to user. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DateTimePicker(Context context)
Construct a new DateTimePicker with default styling, overriding the attributes for
the control as requested, sets the CellType to WidgetType.DATE_TIME_PICKER
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CellValueChangeListener<Date> |
getCellValueChangeListener()
Get the attached
FormCell.CellValueChangeListener | ||||||||||
DateTimePicker.DateTimePickerMode |
getDateTimePickerMode()
Return the mode of the DateTimePicker.
| ||||||||||
Pair<Date, Date> |
getRange()
Get the last selected date range.
| ||||||||||
Date |
getValue()
Get the last selected value.
| ||||||||||
void | onDateSet(DatePicker view, int year, int month, int dayOfMonth) | ||||||||||
void | onRangeSet(int year1, int month1, int dayOfMonth1, int year2, int month2, int dayOfMonth2) | ||||||||||
void | onTimeSet(TimePicker view, int hourOfDay, int minute) | ||||||||||
void |
setCellValueChangeListener(CellValueChangeListener<Date> listener)
Set the
FormCell.CellValueChangeListener for listening the changes to value | ||||||||||
void |
setDateTimePickerMode(DateTimePicker.DateTimePickerMode dateTimePickerMode)
Sets the mode for DateTimePicker
| ||||||||||
void | setDateTimeTitle(CharSequence dateTimeTitle) | ||||||||||
void | setManager(FragmentManager manager) | ||||||||||
void |
setRange(Date value1, Date value2)
Set the date range.
| ||||||||||
void | setTimeTitle(CharSequence timeTitle) | ||||||||||
void |
setUseTextDate(boolean useText)
Set whether the date picker should start in text input mode.
| ||||||||||
void |
setUseTextTime(boolean useText)
Set whether the time picker should start in text input mode.
| ||||||||||
void |
setValue(Date value)
Set the value
| ||||||||||
void |
show()
Show the dialog.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Construct a new DateTimePicker with default styling, overriding the attributes for the control as requested, sets the CellType to WidgetType.DATE_TIME_PICKER
context | context |
---|
Get the attached FormCell.CellValueChangeListener
Return the mode of the DateTimePicker.
Get the last selected value. If no user interaction has taken place then return the current time.
Set the FormCell.CellValueChangeListener
for listening the changes to value
listener | FormCell.CellValueChangeListener
|
---|
Sets the mode for DateTimePicker
dateTimePickerMode | DateTimePickerMode |
---|
Set the date range.
value1 | Start Date |
---|---|
value2 | End Date |
Set whether the date picker should start in text input mode.
useText | boolean |
---|
Set whether the time picker should start in text input mode.
useText | boolean |
---|
Show the dialog. If the mode is TIME_PICKER
then show the TimePicker
dialog else present a DatePicker
dialog