DojoCalendar

DojoCalendar 위젯은 달력을 작성합니다.

여기에 나타낸 것처럼 사용자는 클릭으로 날짜를 설정할 수 있습니다.
Dojo 달력
사용자는 상단에 있는 왼쪽 또는 오른쪽 화살표를 클릭하여 월을 변경할 수 있습니다. 또는 여기에 나타낸 것처럼 사용자가 상단 가운데의 화살표를 클릭한 후 월 선택기에서 항목을 클릭할 수도 있습니다.
Dojo 달력

사용자는 달력의 맨 아래에 있는 왼쪽 또는 오른쪽 연도를 클릭하여 연도를 변경할 수 있습니다.

지원되는 특성은 다음과 같습니다.
value
달력 날짜를 나타내는 날짜 값입니다.

날짜를 가져오거나 설정할 수 있습니다. 기본값은 현재 날짜입니다.

지원되는 함수는 다음과 같습니다.
isSelectorOpen
월 선택기가 열리는지 여부를 표시합니다.
함수 프로토타입은 다음과 같습니다.
function isSelectorOpen() returns (boolean);

지원되는 다른 특성 및 함수는 "위젯 특성 및 함수"와 "위젯 스타일"에서 설명합니다.

예제

다음 코드로 작업하여 달력의 여러 측면을 시도할 수 있습니다. 이 코드는 EGL 작업 스케줄러의 사용에 대해서도 설명합니다.
package myPkg;

import com.ibm.egl.rui.widgets.GridLayout;
import com.ibm.egl.rui.widgets.GridLayoutData;
import dojo.widgets.DojoCalendar;
import dojo.widgets.DojoButton;
import egl.javascript.Job; 

handler MyHandler type RUIhandler {
   initialUI = [ ui ], onConstructionFunction = start, 
   cssFile="css/MyRichUIProject.css", title="MyHandler"}

   ui GridLayout{ columns = 3, rows = 4, cellPadding = 4, 
                  children = [ myButton, myCalendar ] };

   myCalendar DojoCalendar{ layoutData = new GridLayoutData{ row = 2, column = 2 }, 
                            value = DateTimeLib.currentDate() };

   myButton DojoButton{ layoutData = new GridLayoutData{ row = 4, column = 2 }, 
                            text = "Is the month selector open?", 
                            onClick ::= myEventHandler};

   doThis Job{runFunction = myRunFunction};
	
   function start()  
	     strLib.defaultDateFormat = "yyyy/MM/dd";
   end
   function myEventHandler( e event in)
      doThis.repeat(1000);
      myCalendar.value = "2012/04/08";
   end
   function myRunFunction()
      isListBoxOpen Boolean = myCalendar.isSelectorOpen();
      writestdout ("The selector is open:  " + isListBoxOpen);

      if (isListBoxOpen)
         doThis.cancel();
      end
      writestdout ("The date is " + myCalendar.value);
   endend