UNPKG

alpaca

Version:

Alpaca provides the easiest and fastest way to generate interactive forms for the web and mobile devices. It runs simply as HTML5 or more elaborately using Bootstrap, jQuery Mobile or jQuery UI. Alpaca uses Handlebars to process JSON schema and provide

61 lines (48 loc) 1.29 kB
(function($) { var Alpaca = $.alpaca; Alpaca.Fields.TimeField = Alpaca.Fields.DateField.extend( /** * @lends Alpaca.Fields.TimeField.prototype */ { /** * @see Alpaca.Fields.TextField#getFieldType */ getFieldType: function() { return "time"; }, getDefaultFormat: function() { return Alpaca.defaultTimeFormat; }, /** * @see Alpaca.Fields.TextField#setup */ setup: function() { var self = this; // default html5 input type = "time"; //this.inputType = "time"; this.base(); } /* builder_helpers */ , /** * @see Alpaca.Fields.TextField#getTitle */ getTitle: function() { return "Time Field"; }, /** * @see Alpaca.Fields.TextField#getDescription */ getDescription: function() { return "Time Field"; } /* end_builder_helpers */ }); Alpaca.registerMessages({ "invalidTime": "Invalid time" }); Alpaca.registerFieldClass("time", Alpaca.Fields.TimeField); Alpaca.registerDefaultFormatFieldMapping("time", "time"); })(jQuery);