2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FWebCtrl_DateTimeHandler.cpp
20 * @brief The file contains the definition of _DateTimeHandler class.
22 #include <FBaseDateTime.h>
23 #include <FBaseSysLog.h>
24 #include <FGrpDimension.h>
25 #include <FGrpRectangle.h>
26 #include <FLclDateTimeFormatter.h>
27 #include <FLclLocale.h>
29 #include <FUiCtrlButton.h>
30 #include <FUiCtrlEditField.h>
31 #include <FUiCtrlEditDate.h>
32 #include <FUiCtrlEditTime.h>
33 #include <FUiCtrlLabel.h>
34 #include <FUiCtrlPanel.h>
35 #include <FUiIActionEventListener.h>
36 #include <FUiKeyEventInfo.h>
37 #include <FUiLayout.h>
38 #include <FUiVerticalBoxLayout.h>
39 #include <FWebCtrlAuthenticationChallenge.h>
40 #include <FSys_SystemResource.h>
41 #include <FUi_ControlManager.h>
42 #include <FUi_ResourceManager.h>
43 #include "FWebCtrl_WebImpl.h"
44 #include "FWebCtrl_InputPickerPopup.h"
47 using namespace Tizen::Base;
48 using namespace Tizen::Base::Collection;
49 using namespace Tizen::Graphics;
50 using namespace Tizen::Locales;
51 using namespace Tizen::System;
52 using namespace Tizen::Ui;
53 using namespace Tizen::Ui::Controls;
56 namespace Tizen { namespace Web { namespace Controls
60 static const int DATE_POPUP_BUTTON_WIDTH = 250;
63 _InputPickerPopup::_InputPickerPopup(void)
66 , __pSelectionBtn(null)
67 , __pColorPicker(null)
68 , __pButtonPanel(null)
72 , __inputType(EWK_INPUT_TYPE_TIME)
77 _InputPickerPopup::~_InputPickerPopup(void)
87 _InputPickerPopup::Construct(const String& strDate, Ewk_Input_Type inputType, Tizen::Web::Controls::_WebImpl* pImpl)
96 DateTime inputDateTime;
98 __inputPickerMode = INPUT_MODE_DATE;
99 __inputType = inputType;
101 SystemTime::GetCurrentTime(UTC_TIME, inputDateTime);
103 if (!strDate.IsEmpty())
105 r = Parse(strDate, inputDateTime);
108 _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT;
110 _WebPopupData* pPopupData = _WebPopup::GetPopupData();
111 SysTryReturn(NID_WEB_CTRL, pPopupData, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
113 GET_SHAPE_CONFIG(EDITDATE::WIDTH, orientation, dateWidth);
114 GET_SHAPE_CONFIG(EDITDATE::HEIGHT, orientation, dateHeight);
115 GET_SHAPE_CONFIG(POPUP::SIDE_BORDER, orientation, sideMargin);
116 GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, __popupWidth);
117 GET_SHAPE_CONFIG(MESSAGEBOX::MIN_HEIGHT, orientation, __popupHeight);
118 GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_INTERNAL_GAP, orientation, internalGap);
120 __panelHeight = pPopupData->panelHeight;
122 __popupWidth += sideMargin;
124 std::unique_ptr<EditDate> pEditDate(new (std::nothrow) EditDate());
125 SysTryReturnResult(NID_WEB_CTRL, pEditDate.get(), E_OUT_OF_MEMORY, "Memory Allocation Failed.");
127 std::unique_ptr<EditTime> pEditTime(new (std::nothrow) EditTime());
128 SysTryReturnResult(NID_WEB_CTRL, pEditTime.get(), E_OUT_OF_MEMORY, "Memory Allocation Failed.");
130 int space = dateHeight/4;
132 _SystemResource* pSysResource = _SystemResource::GetInstance();
133 SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
137 case EWK_INPUT_TYPE_TIME :
139 __popupHeight = dateHeight + space + __panelHeight;
141 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
143 SetTitleText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_HEADER_SET_TIME"));
145 r = pEditTime->Construct(Point(0, 0), L"Time (Default format) :");
146 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
148 r = AddControl(*pEditTime);
149 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
150 pEditTime->SetTime(inputDateTime);
151 __pEditTime = pEditTime.release();
154 case EWK_INPUT_TYPE_DATETIME :
157 case EWK_INPUT_TYPE_DATETIMELOCAL :
159 __popupHeight = 2*dateHeight + space + __panelHeight + internalGap;
161 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
163 SetTitleText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_HEADER_SET_DATE_AND_TIME_ABB"));
165 r = pEditDate->Construct(Point(0, 0), L"Date (Default format) :");
166 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
168 r = pEditTime->Construct(Point(0, 0), L"Time (Default format) :");
169 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
171 r = AddControl(*pEditTime);
172 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
174 pEditTime->SetTime(inputDateTime);
175 __pEditTime = pEditTime.release();
177 r = AddControl(*pEditDate);
178 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
180 pEditDate->SetDate(inputDateTime);
181 __pEditDate = pEditDate.release();
183 dateHeight = 2 * dateHeight;
186 case EWK_INPUT_TYPE_WEEK :
188 case EWK_INPUT_TYPE_DATE :
190 case EWK_INPUT_TYPE_MONTH :
192 __popupHeight = dateHeight + space + __panelHeight;
194 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
195 SetTitleText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_HEADER_SET_DATE"));
197 r = pEditDate->Construct(Point(0, 0), L"Date (Default format) :");
198 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
200 r = AddControl(*pEditDate);
201 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
203 pEditDate->SetDate(inputDateTime);
204 __pEditDate = pEditDate.release();
208 r = E_UNSUPPORTED_OPTION;
209 SysLogException(NID_WEB_CTRL, r, "[%s] %d is unsupported.", GetErrorMessage(r), __inputType);
213 __pButtonPanel = CreateAndAddPanel();
214 SysTryReturn(NID_WEB_CTRL, __pButtonPanel, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
217 r = idList.Construct();
218 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
221 r = titleList.Construct();
222 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
224 idList.Add(*(new Integer(ID_BUTTON_INPUT_DATE_SELECTION)));
226 titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_OK"))));
228 r = CreateAndAddButtons(idList, titleList, __pButtonPanel);
229 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
231 SetPropagatedKeyEventListener(this);
233 std::unique_ptr<VerticalBoxLayout> pLayout(dynamic_cast< VerticalBoxLayout* >(GetLayoutN()));
234 SysTryReturnResult(NID_WEB_CTRL, pLayout.get(), E_OUT_OF_MEMORY, "Memory Allocation Failed.");
238 __pEditDate->SetSize(__popupWidth,__pEditDate->GetSize().height);
239 pLayout->SetHorizontalAlignment(*__pEditDate, LAYOUT_HORIZONTAL_ALIGN_LEFT);
240 pLayout->SetSpacing(*__pEditDate, sideMargin);
245 __pEditTime->SetSize(__popupWidth,__pEditTime->GetSize().height);
246 pLayout->SetHorizontalAlignment(*__pEditTime, LAYOUT_HORIZONTAL_ALIGN_LEFT);
247 pLayout->SetSpacing(*__pEditTime, sideMargin);
252 pLayout->SetSpacing(*__pButtonPanel, space);
260 _InputPickerPopup::Construct(const Color& color, Tizen::Web::Controls::_WebImpl* pImpl)
262 result r = E_SUCCESS;
264 __inputPickerMode = INPUT_MODE_COLOR;
266 _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
268 _SystemResource* pSysResource = _SystemResource::GetInstance();
269 SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
271 _WebPopupData* pPopupData = _WebPopup::GetPopupData();
272 SysTryReturn(NID_WEB_CTRL, pPopupData, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
274 std::unique_ptr<ColorPicker> pColorPicker(new (std::nothrow) ColorPicker());
275 SysTryReturnResult(NID_WEB_CTRL, pColorPicker.get(), E_OUT_OF_MEMORY, "Memory Allocation Failed.");
277 r = pColorPicker->Construct(Point(0,0));
278 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
280 pColorPicker->SetColor(color);
282 CalculateColorPickerPopupSize(orientation);
285 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
287 SetTitleText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_HEADER_SET_COLOUR"));
289 SetPropagatedKeyEventListener(this);
291 r = AddControl(*pColorPicker);
292 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
294 __pColorPicker = pColorPicker.release();
296 __pButtonPanel = CreateAndAddPanel();
297 SysTryReturn(NID_WEB_CTRL, __pButtonPanel, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
300 r = idList.Construct();
301 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
304 r = titleList.Construct();
305 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
307 idList.Add(*(new Integer(ID_BUTTON_INPUT_COLOR_SELECTION)));
308 titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_OK"))));
310 r = CreateAndAddButtons(idList, titleList, __pButtonPanel);
311 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
313 std::unique_ptr<VerticalBoxLayout> pLayout(dynamic_cast< VerticalBoxLayout* >(GetLayoutN()));
314 SysTryReturnResult(NID_WEB_CTRL, pLayout.get(), E_OUT_OF_MEMORY, "Memory Allocation Failed.");
316 pLayout->SetHorizontalAlignment(*__pColorPicker, LAYOUT_HORIZONTAL_ALIGN_LEFT);
319 GET_SHAPE_CONFIG(POPUP::SIDE_BORDER, orientation, sideMargin);
321 pLayout->SetSpacing(*__pColorPicker, sideMargin);
329 _InputPickerPopup::CalculateColorPickerPopupSize(_ControlOrientation orientation)
333 _WebPopupData* pPopupData = _WebPopup::GetPopupData();
335 GET_SHAPE_CONFIG(POPUP::SIDE_BORDER, orientation, sideMargin);
337 __panelHeight = pPopupData->panelHeight;
338 GET_DIMENSION_CONFIG(COLORPICKER::DEFAULT_SIZE, orientation, dim);
340 dim.width += sideMargin;
341 __popupWidth = dim.width;
342 __popupHeight = dim.height + __panelHeight;
347 _InputPickerPopup::CreatePopup(void)
349 result r = E_SUCCESS;
350 bool hasTitle = true;
352 r = _WebPopup::Construct(hasTitle, Dimension(__popupWidth, __popupHeight));
353 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
359 _InputPickerPopup::OnActionPerformed(const Control& source, int actionId)
361 result r = E_SUCCESS;
365 case ID_BUTTON_INPUT_DATE_SELECTION:
369 case ID_BUTTON_INPUT_COLOR_SELECTION:
379 SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
384 _InputPickerPopup::ChangeLayout(_ControlOrientation orientation)
386 result r = E_SUCCESS;
388 if (__inputPickerMode != INPUT_MODE_COLOR) //Change the layout for color only.
395 _WebPopupData* __pWebPopupData = _WebPopup::GetPopupData();
396 Dimension screenRect = _ControlManager::GetInstance()->GetScreenSize();
398 CalculateColorPickerPopupSize(orientation);
399 __popupHeight += __pWebPopupData->titleHeight;
401 if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
403 x = (screenRect.width - __popupWidth) / 2;
404 y = (screenRect.height - __popupHeight) / 2;
408 x = (screenRect.height - __popupWidth) / 2;
409 y = (screenRect.width - __popupHeight) / 2;
412 r = SetBounds(Rectangle(x, y, __popupWidth, __popupHeight));
413 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
415 r = __pButtonPanel->SetSize(__popupWidth, __popupHeight);
416 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
420 GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_SIDE_MARGIN_01, _CONTROL_ORIENTATION_PORTRAIT, buttonMargin);
422 int buttonWidth = (__popupWidth - buttonMargin*(idCount+1)) / idCount;
423 int buttonTopMargin = (__pWebPopupData->panelHeight - __pWebPopupData->btnDim.height)/2;
425 if (__pButtonPanel->GetControl(0))
427 r = (__pButtonPanel->GetControl(0))->SetBounds(Rectangle(buttonMargin, buttonTopMargin, buttonWidth, __pWebPopupData->btnDim.height));
428 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
436 _InputPickerPopup::UpdateDate(void)
438 result r = E_SUCCESS;
440 String formattedString;
443 std::unique_ptr<DateTimeFormatter> pDateFormatter(DateTimeFormatter::CreateDateFormatterN(DATE_TIME_STYLE_DEFAULT));
444 SysTryReturn(NID_WEB_CTRL, pDateFormatter.get(), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
448 case EWK_INPUT_TYPE_TIME :
449 formattedString = L"HH:mm";
450 pDateFormatter->ApplyPattern(formattedString);
451 pDateFormatter->Format(__pEditTime->GetTime(), __dateStr);
454 case EWK_INPUT_TYPE_DATETIME :
455 formattedString = L"yyyy-MM-dd";
456 pDateFormatter->ApplyPattern(formattedString);
457 pDateFormatter->Format(__pEditDate->GetDate(), __dateStr);
459 formattedString = L"\'T\'HH:mm\'Z\'";
460 pDateFormatter->ApplyPattern(formattedString);
461 pDateFormatter->Format(__pEditTime->GetTime(), __dateStr);
464 case EWK_INPUT_TYPE_DATETIMELOCAL :
465 formattedString = L"yyyy-MM-dd";
466 pDateFormatter->ApplyPattern(formattedString);
467 pDateFormatter->Format(__pEditDate->GetDate(), __dateStr);
469 formattedString = L"\'T\'HH:mm";
470 pDateFormatter->ApplyPattern(formattedString);
471 pDateFormatter->Format(__pEditTime->GetTime(), __dateStr);
474 case EWK_INPUT_TYPE_WEEK :
475 formattedString = L"yyyy-\'W\'ww";
476 pDateFormatter->ApplyPattern(formattedString);
477 pDateFormatter->Format(__pEditDate->GetDate(), __dateStr);
481 case EWK_INPUT_TYPE_DATE :
482 formattedString = L"yyyy-MM-dd";
483 pDateFormatter->ApplyPattern(formattedString);
484 pDateFormatter->Format(__pEditDate->GetDate(), __dateStr);
487 case EWK_INPUT_TYPE_MONTH :
488 formattedString = L"yyyy-MM";
489 pDateFormatter->ApplyPattern(formattedString);
490 pDateFormatter->Format(__pEditDate->GetDate(), __dateStr);
494 r = E_UNSUPPORTED_OPTION;
495 SysLogException(NID_WEB_CTRL, r, "[%s] %d is unsupported.", GetErrorMessage(r), __inputType);
504 _InputPickerPopup::UpdateColor(void)
506 __Color = __pColorPicker->GetColor();
511 _InputPickerPopup::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
517 _InputPickerPopup::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
519 if ((keyEventInfo.GetKeyCode() == KEY_ESC || keyEventInfo.GetKeyCode() == KEY_BACK) && source.GetShowState() == true)
528 _InputPickerPopup::OnPreviewKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
534 _InputPickerPopup::OnPreviewKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
540 _InputPickerPopup::TranslateKeyEventInfo(Control& source, KeyEventInfo& keyEventInfo)
546 _InputPickerPopup::GetDate(void) const
553 _InputPickerPopup::GetColor(void) const
560 _InputPickerPopup::Parse(const String& strDateTime, DateTime & dateTime)
562 std::unique_ptr<DateTimeFormatter> pDateFormatter(DateTimeFormatter::CreateDateFormatterN(DATE_TIME_STYLE_DEFAULT));
563 SysTryReturn(NID_WEB_CTRL, pDateFormatter.get(), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
573 result r = E_SUCCESS;
575 String formattedString = L"e";
578 const wchar_t* pMchar = static_cast< const wchar_t* >(strDateTime.GetPointer());
579 wchar_t* pTmp = static_cast< wchar_t* >(malloc(sizeof(wchar_t) * 10));
580 SysTryReturnResult(NID_WEB_CTRL, pTmp, E_OUT_OF_MEMORY, "Memory allocation failed.");
584 case EWK_INPUT_TYPE_TIME : //"HH:mm";
587 wcsncpy(pTmp, pMchar, 2);
589 hour = static_cast< int >(wcstol(pTmp, null, 10));
592 wcsncpy(pTmp, pMchar + 3, 2);
594 minute = static_cast< int >(wcstol(pTmp, null, 10));
595 dateTime.SetValue(1, 1, 1, hour,minute);
598 case EWK_INPUT_TYPE_DATETIME : // "yyyy-MM-ddTHH:mmZ";
600 case EWK_INPUT_TYPE_DATETIMELOCAL :
602 wcsncpy(pTmp, pMchar, 4);
605 year = static_cast< int >(wcstol(pTmp, null, 10));
608 wcsncpy(pTmp, pMchar + 5, 2);
611 month = static_cast< int >(wcstol(pTmp, null, 10));
614 wcsncpy(pTmp, pMchar + 8, 2);
617 day = static_cast< int >(wcstol(pTmp, null, 10));
620 wcsncpy(pTmp, pMchar + 11, 2);
623 hour = static_cast< int >(wcstol(pTmp, null, 10));
626 wcsncpy(pTmp, pMchar + 14, 2);
628 minute = static_cast< int >(wcstol(pTmp, null, 10));
629 dateTime.SetValue(year, month, day, hour, minute);
632 case EWK_INPUT_TYPE_WEEK : //"yyyy-Www";
635 wcsncpy(pTmp, pMchar, 4);
638 year = static_cast< int >(wcstol(pTmp, null, 10));
641 wcsncpy(pTmp, pMchar + 6, 2);
643 week = static_cast< int >(wcstol(pTmp, null, 10));
645 dateTime.SetValue(year,1,1);
646 pDateFormatter->ApplyPattern(formattedString);
647 pDateFormatter->Format(dateTime, dayno);
648 Integer::Parse(dayno, day);
649 days = (week*7) - day;
651 GetDateTimeForWeek(year, days, dateTime);
654 case EWK_INPUT_TYPE_DATE : //"yyyy-MM-dd"
656 wcsncpy(pTmp, pMchar, 4);
658 year = static_cast< int >(wcstol(pTmp, null, 10));
661 wcsncpy(pTmp, pMchar + 5, 2);
663 month = static_cast< int >(wcstol(pTmp, null, 10));
666 wcsncpy(pTmp, pMchar + 8, 2);
668 day = static_cast< int >(wcstol(pTmp, null, 10));
670 dateTime.SetValue(year, month, day);
673 case EWK_INPUT_TYPE_MONTH : //"yyyy-MM";
676 wcsncpy(pTmp, pMchar, 4);
678 year = static_cast< int >(wcstol(pTmp, null, 10));
681 wcsncpy(pTmp, pMchar + 5, 2);
683 month = static_cast< int >(wcstol(pTmp, null, 10));
685 dateTime.SetValue(year, month, 1);
689 r = E_UNSUPPORTED_OPTION;
690 SysLogException(NID_WEB_CTRL, r, "[%s] %d is unsupported.", GetErrorMessage(r), __inputType);
700 _InputPickerPopup::GetDateTimeForWeek(int year, int days, DateTime& dateTime)
704 for (int month = 1; month <= 12; month++)
706 DateTime::GetDaysInMonth(year, month, monthDays);
708 if (days - monthDays < 0)
710 dateTime.SetValue(year, month, days);
719 }}} // Tizen::Web::Controls