PATH:
home
/
letacommog
/
supportleta
/
wp-content
/
themes
/
easyweb
/
inc
/
meta-box
/
js
jQuery( function ( $ ) { 'use strict'; /** * Update date picker element * Used for static & dynamic added elements (when clone) */ function update() { var $this = $( this ), options = $this.data( 'options' ), $inline = $this.siblings( '.rwmb-datetime-inline' ), $timestamp = $this.siblings( '.rwmb-datetime-timestamp' ), current = $this.val(); $this.siblings( '.ui-datepicker-append' ).remove(); // Remove appended text if ( $timestamp.length ) { var $picker = $inline.length ? $inline : $this; options.onSelect = function () { $timestamp.val( getTimestamp( $picker.datepicker( 'getDate' ) ) ); }; } if ( $inline.length ) { options.altField = '#' + $this.attr( 'id' ); $inline .removeClass( 'hasDatepicker' ) .empty() .prop( 'id', '' ) .datepicker( options ) .datepicker( 'setDate', current ); } else { $this.removeClass( 'hasDatepicker' ).datepicker( options ); } } /** * Convert date to Unix timestamp in milliseconds * @link http://stackoverflow.com/a/14006555/556258 * @param date * @return number */ function getTimestamp( date ) { var milliseconds = Date.UTC( date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds() ); return Math.floor( milliseconds / 1000 ); } $( ':input.rwmb-date' ).each( update ); $( '.rwmb-input' ).on( 'clone', ':input.rwmb-date', update ); } );
[+]
..
[-] image-upload.js
[edit]
[-] image-advanced.js
[edit]
[-] thickbox-image.js
[edit]
[-] file-upload.js
[edit]
[-] wysiwyg.js
[edit]
[-] input-list.js
[edit]
[-] validate.js
[edit]
[-] jquery.validate.min.js
[edit]
[-] time.js
[edit]
[-] media.js
[edit]
[-] date.js
[edit]
[-] map-frontend.js
[edit]
[-] select.js
[edit]
[-] map.js
[edit]
[+]
jqueryui
[-] datetime.js
[edit]
[-] color.js
[edit]
[-] image.js
[edit]
[-] select-tree.js
[edit]
[+]
select2
[-] file-input.js
[edit]
[-] autosave.js
[edit]
[-] autocomplete.js
[edit]
[-] file.js
[edit]
[-] range.js
[edit]
[-] select-advanced.js
[edit]
[-] oembed.js
[edit]
[-] clone.js
[edit]
[-] slider.js
[edit]
[-] image-select.js
[edit]