head	1.2;
access;
symbols;
locks
	root:1.2; strict;
comment	@# @;


1.2
date	2009.12.07.04.32.44;	author root;	state Exp;
branches;
next	1.1;

1.1
date	2009.12.07.04.32.03;	author root;	state Exp;
branches;
next	;


desc
@/opt/nforge/var/wiki/easylogiclib/data/text/WBCalendar
@


1.2
log
@118.219.84.10;;cyberuls easylogic ;;
@
text
@= Description = 
 * 달력을 표현해주는 Control 이다. php의 날짜 포맷으로 달력에서 날짜를 바로 지정 할 수 있다.
= Sample = 

{{{#!vim php 

<?php

$window = new WBPopupWindow(array(
	'parent' => null,
	'width' => 300,
	'height' => 600,
	'title' => '달력테스트',
));

$window->getRootPanel()->setLayout(new WBGridLayout(3,1));

$panel = $window->getRootPanel();

$calendar = $panel->add(new WBCalendar(array(
	'parent' => $window, 
	'border' => true,
	'event' => array(
		'click' => 'test',
	),
)));

$edit = $panel->add(new WBEditBox(array(
	'parent' => $window,
	'text' => '2 day'
)));

$button = $panel->add(new WBPushButton(array(
	'parent' => $window,
	'caption' => '날짜더하기',
	'event' => array(
		'click' => 'addDate',
	)
)));

$window->setVisible(true);

WBApplication::start();


function test($eo) { 

	WBDialog::info($eo->window(), $eo->object()->getDate(), '날짜');
}

function addDate($eo) { 
	global $edit, $calendar;

	$calendar->setDate(strtotime($edit->getText(), strtotime($calendar->getDate())))	;
}

?>
}}}

= Code = 
 * 포맷으로 날짜 얻어오기, date() 에서 지원하는 포맷  
{{{#!vim php 
<?php 
echo $calendar->getDate(); // default format : Y-m-d 
or 
echo $calendar->getDate('Y년 m월 d일');
?>
}}}
 * 날짜 설정 하기 , timestamp 또는 strtotime()이 지원하는 포맷  
{{{#!vim php 
<?php 
$calendar->setDate('2 day');
or 
$calendar->setDate(strtotime('2008-01-01'));
or 
$calendar->setDate('2008-01-01');
?>
}}}
@


1.1
log
@118.219.84.10;;cyberuls easylogic ;;
@
text
@a2 2


@
