Sha256: 138e0fc17639d9ce6f46d4d975cae97512d9ec967ae084c0d9c60f1a3f68b0d1
Contents?: true
Size: 647 Bytes
Versions: 19
Compression:
Stored size: 647 Bytes
Contents
Spider.defineWidget('Spider.Forms.DateTime', { autoInit: true, ready: function(){ if (this.el.is('.date')) this.el.datepicker(); else if (this.el.is('.date_time')){ var el = this.el; el.hide(); var val = el.val().split(' '); if (!val[1]) val[1] = ''; var d = $('<input type="text" class="date" size="10" />').val(val[0]).insertAfter(el).datepicker(); var span = $('<span> </span>').insertAfter(d); var t = $('<input type="text" class="time" size="8" />').val(val[1]).insertAfter(span); var updateDt = function(){ el.val(d.val()+' '+t.val()); }; d.change(updateDt); t.change(updateDt); } } });
Version data entries
19 entries across 19 versions & 1 rubygems