1( function ( $ ) { 2 3 $( document ).ready( function() { 4 5 let timeOut = setInterval( function() { 6 7 if ( $( 'form#tickera_cart' ).length > 0 || $( 'form.checkout' ).length > 0 ) { 8 9 $( '.tc_custom_date_picker_element .tickera-input-field' ).each( function () { 10 $( this ).attr( 'autocomplete', 'off' ).datepicker( { 11 showButtonPanel: false, 12 closeText: objectL10n.closeText, 13 currentText: objectL10n.currentText, 14 monthNames: objectL10n.monthNames, 15 monthNamesShort: objectL10n.monthNamesShort, 16 dayNames: objectL10n.dayNames, 17 dayNamesShort: objectL10n.dayNamesShort, 18 dayNamesMin: objectL10n.dayNamesMin, 19 dateFormat: objectL10n.dateFormat, 20 firstDay: objectL10n.firstDay, 21 isRTL: objectL10n.isRTL, 22 changeYear: true, 23 yearRange: "1900:2050" 24 } ); 25 } ); 26 27 clearInterval( timeOut ); 28 } 29 30 }, 1000 ); 31 32 $( '#proceed_to_checkout' ).click( function( e ) { 33 $( '.tc_cart_errors .invalid-date-format' ).remove(); 34 $( '#tickera_cart .hasDatepicker' ).each( function() { 35 var label = $( this ).closest( 'label' ).find( 'span' ).text(), 36 tc_date_value = $( this ).val(), 37 tc_check_date = validate_date( tc_date_value ); 38 39 // var dateRegex = /^(?=\d)(?:(?:31(?!.(?:0?[2469]|11))|(?:30|29)(?!.0?2)|29(?=.0?2.(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))(?:\x20|$))|(?:2[0-8]|1\d|0?[1-9]))([-.\/])(?:1[012]|0?[1-9])\1(?:1[6-9]|[2-9]\d)?\d\d(?:(?=\x20\d)\x20|$))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\x20[AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$/; 40 // var tc_check_date = dateRegex.test( tc_date_value ) ; 41 42 if ( tc_check_date == false ) { 43 e.preventDefault(); 44 $( '.tc_cart_errors' ).append( '<li class="invalid-date-format">' + objectL10n.invalid_error_message + ' ' + label.replace( '*', '' ) + ' ' + objectL10n.date_format_error_message + '</li>' ); 45 } 46 } ); 47 } ); 48 } ); 49 50 function validate_date( dtValue ) { 51 var dtRegex = new RegExp(/\b\d{1,2}[\/-]\d{1,2}[\/-]\d{4}\b/); 52 return dtRegex.test( dtValue ); 53 } 54 55})( jQuery );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.