diff options
Diffstat (limited to 'framework/Web/UI/WebControls/TDatePicker.php')
-rw-r--r-- | framework/Web/UI/WebControls/TDatePicker.php | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php index f24d760f..a1a2b19d 100644 --- a/framework/Web/UI/WebControls/TDatePicker.php +++ b/framework/Web/UI/WebControls/TDatePicker.php @@ -10,11 +10,7 @@ */ namespace Prado\Web\UI\WebControls; - -/** - * Includes TTextBox class - */ -Prado::using('System.Web.UI.WebControls.TTextBox'); +use Prado\TPropertyValue; /** * @@ -315,14 +311,14 @@ class TDatePicker extends TTextBox else { $date = TPropertyValue::ensureFloat($value); - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter',$this->getDateFormat()); + $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter',$this->getDateFormat()); $this->setText($formatter->format($date)); } } /** * Returns the timestamp selected by the user. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link getTimeStamp()}. * @return integer the timestamp of the TDatePicker control. * @see getTimeStamp @@ -335,7 +331,7 @@ class TDatePicker extends TTextBox /** * Sets the timestamp represented by this control. - * This method is required by {@link IDataRenderer}. + * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link setTimeStamp()}. * @param integer the timestamp of the TDatePicker control. * @see setTimeStamp @@ -389,7 +385,7 @@ class TDatePicker extends TTextBox /** * Returns the value to be validated. - * This methid is required by IValidatable interface. + * This methid is required by \Prado\Web\UI\IValidatable interface. * @return integer the interger timestamp if valid, otherwise the original text. */ public function getValidationPropertyValue() @@ -506,7 +502,7 @@ class TDatePicker extends TTextBox $pattern = $this->getDateFormat(); $pattern = str_replace(array('MMMM', 'MMM'), array('MM','MM'), $pattern); - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', $pattern); + $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter', $pattern); return $formatter->format($date); } @@ -579,7 +575,6 @@ class TDatePicker extends TTextBox { //expensive operations $culture = $this->getCurrentCulture(); - Prado::using('System.I18N.core.DateTimeFormatInfo'); $info = Prado::createComponent('System.I18N.core.CultureInfo', $culture); return $info->getDateTimeFormat(); } @@ -618,7 +613,7 @@ class TDatePicker extends TTextBox protected function hasDayPattern() { - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', + $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter', $this->getDateFormat()); return ($formatter->getDayPattern()!==null); } @@ -630,7 +625,7 @@ class TDatePicker extends TTextBox */ protected function renderCalendarSelections($writer, $date) { - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', + $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter', $this->getDateFormat()); foreach($formatter->getDayMonthYearOrdering() as $type) @@ -652,7 +647,7 @@ class TDatePicker extends TTextBox { $pattern = $this->getDateFormat(); $pattern = str_replace(array('MMMM', 'MMM'), array('MM','MM'), $pattern); - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter',$pattern); + $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter',$pattern); return $formatter->parse($this->getText()); } @@ -698,7 +693,7 @@ class TDatePicker extends TTextBox */ protected function getDropDownDayOptions() { - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', + $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter', $this->getDateFormat()); $days = array(); $requiresPadding = $formatter->getDayPattern() === 'dd'; @@ -737,7 +732,7 @@ class TDatePicker extends TTextBox */ protected function getLocalizedMonthNames($info) { - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', + $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter', $this->getDateFormat()); switch($formatter->getMonthPattern()) { |