Mage_Core_Block_Html_Date Class Reference

Inheritance diagram for Mage_Core_Block_Html_Date:

Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object Mage_Adminhtml_Block_Html_Date

List of all members.

Public Member Functions

 getEscapedValue ($index=null)
 getHtml ()

Protected Member Functions

 _toHtml ()


Detailed Description

Definition at line 35 of file Date.php.


Member Function Documentation

_toHtml (  )  [protected]

Render block HTML

Returns:
string

Reimplemented from Mage_Core_Block_Template.

Definition at line 38 of file Date.php.

00039     {
00040         $html  = '<input type="text" name="' . $this->getName() . '" id="' . $this->getId() . '" ';
00041         $html .= 'value="'.$this->getValue().'" class="'.$this->getClass().'" style="width:100px" '.$this->getExtraParams().'/> ';
00042 
00043         $html .= '<img src="' . $this->getImage() . '" alt="" class="v-middle" ';
00044         $html .= 'title="' . $this->helper('core')->__('Select Date') . '" id="' . $this->getId() . '_trig" />';
00045 
00046         $html .=
00047 
00048         '<script type="text/javascript">
00049             Calendar.setup({
00050                 inputField  : "' . $this->getId() . '",
00051                 ifFormat    : "' . $this->getFormat() . '",
00052                 button      : "' . $this->getId() . '_trig",
00053                 align       : "Bl",
00054                 singleClick : true
00055             });
00056         </script>';
00057 
00058 
00059         return $html;
00060     }

getEscapedValue ( index = null  ) 

Definition at line 62 of file Date.php.

00062                                                  {
00063 
00064         if($this->getFormat() && $this->getValue()) {
00065             return strftime($this->getFormat(), strtotime($this->getValue()));
00066         }
00067 
00068         return htmlspecialchars($this->getValue());
00069     }

getHtml (  ) 

Definition at line 71 of file Date.php.

00072     {
00073         return $this->toHtml();
00074     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:53 2009 for Magento by  doxygen 1.5.8