Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dgrammatiko/88a1a5fda0e88ff07e0723d85118fdba to your computer and use it in GitHub Desktop.
Save dgrammatiko/88a1a5fda0e88ff07e0723d85118fdba to your computer and use it in GitHub Desktop.
initCalender in 3.6
var initCalendar = function()
{
var id = $(this).attr('id');
var btnId = id + "_btn";
$(btnId).setAttr('data-dayformat', "%Y-%m-%d");
$(btnId).setAttr('data-firstday', 1);
JoomlaCalendar.init( $(this).parent('.field-calendar')[0] );
};
@dgrammatiko
Copy link
Author

        Calendar.setup({
            // Id of the input field
            inputField: id,
            // Format of the input field
            ifFormat: "%Y-%m-%d",
            // Trigger for the calendar (button ID)
            button: id + "_img",
            // Alignment (defaults to "Bl")
            align: "Tl",
            singleClick: true,
            firstDay: 1
        });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment