Skip to content

44727065/Yummi-cal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Yummical Theme for Keith Wood jQuery datepick™


Author: Gummibearlab Created: 20/09/2012 Version: 1.0 Datepick: http://keith-wood.name/datepick.html **



##Table of Contents

  1. LESS + CSS Files
  2. Javascript snippets
  3. Browser Compatibility

##1. LESS + CSS Files There are two files in the repository; 1 LESS and 1 CSS file: the LESS file it's easier to customize, the CSS file is easier to work with. Your choice.

##2. Javascript Files There are 2 Javascript snippets in this theme:

  • datePickerTextSize();
  • $('.datepick').removeAttr('style');
datePickerTextSize();

this function is very easy to implement, you should call it everytime you need to set the font size, like on $(document).ready(); and/or on $(window).resize();

If you need to set it on every window resize, maybe you can use this event https://github.com/louisremi/jquery-smartresize.

function datePickerTextSize() {

	var fontRatio = 0.050;

	$('.myDatepick').each(function() {
		var datepicker = $(this).find('.datepick'),
		datepickerWidth = datepicker.width(),
		newFontSize = parseInt(datepickerWidth * fontRatio);

		$(this).css({'font-size' : newFontSize});

	});
}
$('.datepick').removeAttr('style');

with this snippet you remove a style attribute used on the old CSS datepick basic theme. Leaving the style will cause a mess with my 100% width.

Usage is very simple, just remove style attribute on onShow event.

	$('.myDatepick').datepick({

		onShow: function() {

        	$('.datepick').removeAttr('style');

        }

	});

##3. Browser Compatibility

This theme works well (-) or great (X) in the following browsers:

IE 6-8 (not tested) IE 9+ X Chrome X Firefox - (year and months selects are ugly) Safari X Opera -


About

Responsive calendar theme for jQuery Datepicker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published