I am new to joomla, want to implement two calenders in a page ...

 From : 
    echo JHTML::calendar('sch_from', 'sch_from', '%Y-%m-%d');
 To :
    echo JHTML::calendar('sch_to', 'sch_to', '%Y-%m-%d');

But first calendar only working... is there any issue in code?

1 Answer 1


The arguments you have supplied is wrong.

The function has implemented with following arguments:

public static function calendar($value, $name, $id, $format = '%Y-%m-%d', $attribs = null) 

It should be like this:

JHTML::calendar('', 'sch_from', 'sch_from', '%Y-%m-%d');
JHTML::calendar('', 'sch_to', 'sch_to', '%Y-%m-%d');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.