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

20 lines (18 loc) 448 B
/** * Automatically detect British (`dd/mm/yyyy`) date types. Goes with the UK * date sorting plug-in. * * @name Date (`dd/mm/yyyy`) * @summary Detect data which is in the date format `dd/mm/yyyy` * @author Andy McMaster */ jQuery.fn.dataTableExt.aTypes.unshift( function ( sData ) { if (sData !== null && sData.match(/^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[012])\/(19|20|21)\d\d$/)) { return 'date-uk'; } return null; } );