Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added the calendar instance to the input.data #8

Merged
merged 1 commit into from

2 participants

@enyo

I'm using CalEnder in formwatcher but I need to update the date every time the input is selected.
Currently there is no way for me to access the Calendar instance after using $.calender so I wrote this patch that puts the CalEnder instance into the input fields data object.

@ded
Owner
ded commented

i was considering returning the instance from $.calender, but i like this data option better.

@ded ded merged commit f2ce0cb into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 1, 2012
  1. @enyo
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 0 deletions.
  1. +1 −0  calender.js
View
1  calender.js
@@ -38,6 +38,7 @@
this.months = (this.options.months || 'January February March April May June July August September October November December').split(' ')
this.$input = $(el).first()
this.$calendar = $(template).appendTo('body')
+ this.$input.data('calender', this)
this.formatDate = (this.options.formatDate || function(year, month, day) {
return [ month, day, year].join('-')
})
Something went wrong with that request. Please try again.