Joomla Programming (Joomla 1.5.x)
You may have come across coding like the one here...
JHTML::_( 'behavior.calendar' );
..
..
< input class="inputbox" type="text" name="review_date"
id="review_date" size="25" maxlength="19"
value="< ?php echo $row->review_date; ?>" / >
< input type="reset" class="button" value="..."
onclick=" return showCalendar( 'review_date','y-mm-dd' );" / >
The part that is inaccurate is the date format, which is, 'y-mm-dd'. Instead of showing the date, it shows y-mm-dd literally.
Replace it with '%y-%m-%d'
Or replace with '%Y-%m-%d' if you want the year in 4 digit format i.e. 2008.
SITE NOTE: To display the HTML tags on JoomlaFAQs, there is a space between the name of the tags and the enclosing "less than" (<) and "more than" (>) brackets. If you copy the code, make sure you delete the spaces to make it work!
If you have found this site to be useful and has helped you, kindly consider to donate. Your donation will encourage me and help to upkeep JoomlaFAQs.org! Cheers!
Add comment