Skip to content

Instantly share code, notes, and snippets.

@denysdesign
Last active May 11, 2017 07:46
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save denysdesign/090d857c58f555fe0af966ec5cd9431f to your computer and use it in GitHub Desktop.
Save denysdesign/090d857c58f555fe0af966ec5cd9431f to your computer and use it in GitHub Desktop.
Joomla! calendar + UIKIT 3
jQuery(document).ready(function () {
// calendar
uikit_jcalendar();
// button
uikit_jcalendar_btn('#news_created_btn', 'uk-button-primary', 'calendar');
uikit_jcalendar_btn('#news_publish_up_btn', 'uk-button-secondary', 'future');
});
// calendar
function uikit_jcalendar()
{
jQuery('.js-calendar .table').removeClass('table').addClass('uk-table');
jQuery('.js-calendar .daysrow, .js-calendar .day').addClass('uk-text-large');
jQuery('.js-calendar select.time').addClass('uk-select');
jQuery('.js-calendar .btn-group .js-btn').addClass('uk-width-1-3 uk-button uk-button-default uk-padding-remove-top uk-padding-remove-bottom uk-padding-small');
jQuery('.js-calendar .btn-group').removeClass('btn-group').addClass('uk-button-group');
}
// button
function uikit_jcalendar_btn(trigger, tm_button, tm_icon)
{
jQuery(trigger).addClass('uk-button uk-button-small '+ tm_button);
jQuery(trigger +' span').append('<i uk-icon="icon: '+ tm_icon +'"></i>');
}
@denysdesign
Copy link
Author

denysdesign commented May 11, 2017

Before:
0

After:
index

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