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

Version Path
spiderfw-0.5.19 apps/core/forms/public/date_time.js
spiderfw-0.5.18 apps/core/forms/public/date_time.js
spiderfw-0.5.17 apps/core/forms/public/date_time.js
spiderfw-0.5.16 apps/core/forms/public/date_time.js
spiderfw-0.5.15 apps/core/forms/public/date_time.js
spiderfw-0.5.14 apps/core/forms/public/date_time.js
spiderfw-0.5.13 apps/core/forms/public/date_time.js
spiderfw-0.5.12 apps/core/forms/public/date_time.js
spiderfw-0.5.11 apps/core/forms/public/date_time.js
spiderfw-0.5.10 apps/core/forms/public/date_time.js
spiderfw-0.5.9 apps/core/forms/public/date_time.js
spiderfw-0.5.7 apps/core/forms/public/date_time.js
spiderfw-0.5.6 apps/core/forms/public/date_time.js
spiderfw-0.5.5 apps/core/forms/public/date_time.js
spiderfw-0.5.4 apps/core/forms/public/date_time.js
spiderfw-0.5.3 apps/core/forms/public/date_time.js
spiderfw-0.5.2 apps/core/forms/public/date_time.js
spiderfw-0.5.1 apps/core/forms/public/date_time.js
spiderfw-0.5 apps/core/forms/public/date_time.js