DatePicker
A view displays date and time with editing ability.
Header | #include "nativeui/date_picker.h" |
Namespace | namespace nu |
Type | class (RefCounted) |
Inherits | View |
Constructors
DatePicker(const DatePicker::Options& options)
Create a new DatePicker
with options
.
Parameters
const DatePicker::Options&
options
Class properties
const char*
kClassName
The class name of this view.
Methods
void SetDate(const base::Time& time)
Set the selected date to time
.
Parameters
const base::Time&
time
base::Time GetDate() const
Get the selected date.
Return
base::Time
void SetRange(const absl::optional<base::Time>& minimum, const absl::optional<base::Time>& maximum)
Set the minimum
and maximum
date values.
Parameters
const absl::optional<base::Time>&
minimumconst absl::optional<base::Time>&
maximum
std::tuple<absl::optional<base::Time>, absl::optional<base::Time>> GetRange() const
Return the minimum
and maximum
date values.
Return
std::tuple<absl::optional<base::Time>, absl::optional<base::Time>>
bool HasStepper() const
Return whether there is a stepper attached to the text field.
Return
bool
Events
void on_date_change(DatePicker* self)
Emitted when the selected date has been changed.
Parameters
DatePicker*
self