Permalink
Browse files

Updated combined and minified, incremented version number to 0.2

  • Loading branch information...
Twipped committed Mar 25, 2012
1 parent 6f144a9 commit 9d29ff5de01d68a1683722ebec2ebfa0910aabe5
Showing with 62 additions and 45 deletions.
  1. +19 −3 build/kalendae.js
  2. +42 −41 build/kalendae.min.js
  3. +1 −1 src/header.js
View
@@ -2,7 +2,7 @@
* Kalendae, a framework agnostic javascript date picker *
* Copyright(c) 2012 Jarvis Badgley (chipersoft@gmail.com) *
* http://github.com/ChiperSoft/Kalendae *
- * Version 0.1 *
+ * Version 0.2 *
********************************************************************/
(function (undefined) {
@@ -30,6 +30,8 @@ var Kalendae = function (targetElement, options) {
i = 0,
j = opts.months;
+ if (util.isIE8()) util.addClassName($container, 'ie8');
+
//generate the column headers (Su, Mo, Tu, etc)
i = 7;
while (i--) {
@@ -520,6 +522,11 @@ var parseDates = function (input, delimiter, format) {
window.Kalendae = Kalendae;
var util = Kalendae.util = {
+
+ isIE8: function() {
+ return !!( (/msie 8./i).test(navigator.appVersion) && !(/opera/i).test(navigator.userAgent) && window.ActiveXObject && XDomainRequest && !window.msPerformance );
+ },
+
// ELEMENT FUNCTIONS
$: function (elem) {
@@ -726,6 +733,14 @@ Kalendae.Input = function (targetElement, options) {
//call our parent constructor
Kalendae.call(self, opts);
+ //create the close button
+ if (opts.closeButton) {
+ var $closeButton = util.make('a', {'class':classes.closeButton}, self.container)
+ util.addEvent($closeButton, 'click', function () {
+ $input.blur();
+ });
+ }
+
if (overwriteInput) $input.value = self.getSelected();
var $container = self.container,
@@ -767,12 +782,13 @@ Kalendae.Input.prototype = util.merge(Kalendae.prototype, {
defaults : util.merge(Kalendae.prototype.defaults, {
format: 'MM/DD/YYYY',
side: 'bottom',
+ closeButton: true,
offsetLeft: 0,
offsetTop: 0
}),
classes : util.merge(Kalendae.prototype.classes, {
- positioned : 'k-floating'
-
+ positioned : 'k-floating',
+ closeButton: 'k-btn-close'
}),
show : function () {
Oops, something went wrong.

0 comments on commit 9d29ff5

Please sign in to comment.