Skip to content

Instantly share code, notes, and snippets.

@kenji4569
Created September 8, 2011 00:53
Show Gist options
  • Save kenji4569/1202321 to your computer and use it in GitHub Desktop.
Save kenji4569/1202321 to your computer and use it in GitHub Desktop.
script = SCRIPT("""
jQuery(function() { var t = 10; (function run() {if ((function() {
var el = jQuery("#%(id)s");
if (el.AnyTime_picker == undefined) { return true; }
el.AnyTime_noPicker().AnyTime_picker(
jQuery.extend({format: "%%Y-%%m-%%d", labelTitle: "%(title)s"},
%(date_option)s));
})()) {setTimeout(run, t); t = 2*t;}})();});
""" % dict(id=_id, title=current.T('Choose date'),
date_option=_get_date_option()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment