39 virtual std::chrono::system_clock::time_point
max_date()
const {
return max_date_;}
52 std::tm internal_max_date = max_date;
53 return this->max_date(mktime(&internal_max_date));
59 std::tm internal_max_date = {};
60 internal_max_date.tm_year = year - 1900;
61 internal_max_date.tm_mon = month - 1;
62 internal_max_date.tm_mday = day;
63 return max_date(mktime(&internal_max_date));
68 virtual control&
max_date(int32_t year, int32_t month, int32_t day, int32_t hour, int32_t minute, int32_t second) {
69 std::tm internal_max_date = {};
70 internal_max_date.tm_year = year - 1900;
71 internal_max_date.tm_mon = month - 1;
72 internal_max_date.tm_mday = day;
73 internal_max_date.tm_hour = hour;
74 internal_max_date.tm_min = minute;
75 internal_max_date.tm_sec = second;
76 return max_date(mktime(&internal_max_date));
81 virtual std::chrono::system_clock::time_point
min_date()
const {
return max_date_;}
94 std::tm internal_min_date = min_date;
95 return this->min_date(mktime(&internal_min_date));
101 std::tm internal_min_date = {};
102 internal_min_date.tm_year = year - 1900;
103 internal_min_date.tm_mon = month - 1;
104 internal_min_date.tm_mday = day;
105 return min_date(mktime(&internal_min_date));
110 virtual control&
min_date(int32_t year, int32_t month, int32_t day, int32_t hour, int32_t minute, int32_t second) {
111 std::tm internal_min_date = {};
112 internal_min_date.tm_year = year - 1900;
113 internal_min_date.tm_mon = month - 1;
114 internal_min_date.tm_mday = day;
115 internal_min_date.tm_hour = hour;
116 internal_min_date.tm_min = minute;
117 internal_min_date.tm_sec = second;
118 return min_date(mktime(&internal_min_date));
123 virtual std::chrono::system_clock::time_point
value()
const {
return value_;}
129 virtual control&
value(time_t value) {
return this->
value(std::chrono::system_clock::from_time_t(value));}
133 std::tm internal_value = value;
134 return this->value(mktime(&internal_value));
139 std::tm internal_value = {};
140 internal_value.tm_year = year - 1900;
141 internal_value.tm_mon = month - 1;
142 internal_value.tm_mday = day;
143 return value(mktime(&internal_value));
147 virtual control&
value(int32_t year, int32_t month, int32_t day, int32_t hour, int32_t minute, int32_t second) {
148 std::tm internal_value = {};
149 internal_value.tm_year = year - 1900;
150 internal_value.tm_mon = month - 1;
151 internal_value.tm_mday = day;
152 internal_value.tm_hour = hour;
153 internal_value.tm_min = minute;
154 internal_value.tm_sec = second;
155 return value(mktime(&internal_value));
182 std::chrono::system_clock::time_point max_date_ = std::chrono::system_clock::time_point::max();
183 std::chrono::system_clock::time_point min_date_ = std::chrono::system_clock::time_point::min();
184 std::chrono::system_clock::time_point value_ = std::chrono::system_clock::now();
Represents an ARGB (alpha, red, green, blue) color.
Definition: color.h:39
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:25
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
Represents an event.
Definition: event.h:21
Contains xtd::forms::control control.
event< date_time_picker, event_handler > value_changed
Occurs when the value of the value property changes.
Definition: date_time_picker.h:162
#define forms_export_
Define shared library export.
Definition: forms_export.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17