mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
New version 2.0.5
Fix bu with destroy picker Add rule for automatic generate mask
This commit is contained in:
parent
ca629882fc
commit
e9a5781dfe
@ -20,7 +20,7 @@
|
|||||||
"jquery",
|
"jquery",
|
||||||
"touch"
|
"touch"
|
||||||
],
|
],
|
||||||
"version": "2.0.4",
|
"version": "2.0.5",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Chupurnov Valeriy",
|
"name": "Chupurnov Valeriy",
|
||||||
"email": "chupurnov@gmail.com",
|
"email": "chupurnov@gmail.com",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @preserve jQuery DateTimePicker plugin v2.0.4
|
* @preserve jQuery DateTimePicker plugin v2.0.5
|
||||||
* @homepage http://xdsoft.net/jqplugins/datetimepicker/
|
* @homepage http://xdsoft.net/jqplugins/datetimepicker/
|
||||||
* (c) 2013, Chupurnov Valeriy.
|
* (c) 2013, Chupurnov Valeriy.
|
||||||
*/
|
*/
|
||||||
@ -188,7 +188,7 @@
|
|||||||
scrollMonth:true,
|
scrollMonth:true,
|
||||||
scrollTime:true,
|
scrollTime:true,
|
||||||
scrollInput:true,
|
scrollInput:true,
|
||||||
mask:false,
|
mask:true,
|
||||||
validateOnBlur:true,
|
validateOnBlur:true,
|
||||||
yearStart:1950,
|
yearStart:1950,
|
||||||
yearEnd:2050,
|
yearEnd:2050,
|
||||||
@ -346,16 +346,16 @@
|
|||||||
input.off('keydown.xdsoft');
|
input.off('keydown.xdsoft');
|
||||||
switch(true){
|
switch(true){
|
||||||
case ( options.mask===true ):
|
case ( options.mask===true ):
|
||||||
options.mask = (new Date()).dateFormat( options.format );
|
//options.mask = (new Date()).dateFormat( options.format );
|
||||||
options.mask = options.mask.replace(/[0-9]/g,'_');
|
//options.mask = options.mask.replace(/[0-9]/g,'_');
|
||||||
/*options.mask = options.format
|
options.mask = options.format
|
||||||
.replace(/Y/g,'9999')
|
.replace(/Y/g,'9999')
|
||||||
.replace(/F/g,'9999')
|
.replace(/F/g,'9999')
|
||||||
.replace(/m/g,'19')
|
.replace(/m/g,'19')
|
||||||
.replace(/d/g,'39')
|
.replace(/d/g,'39')
|
||||||
.replace(/H/g,'29')
|
.replace(/H/g,'29')
|
||||||
.replace(/i/g,'59')
|
.replace(/i/g,'59')
|
||||||
.replace(/s/g,'59');*/
|
.replace(/s/g,'59');
|
||||||
case ( $.type(options.mask) == 'string' ):
|
case ( $.type(options.mask) == 'string' ):
|
||||||
if( !isValidValue( options.mask,input.val() ) )
|
if( !isValidValue( options.mask,input.val() ) )
|
||||||
input.val(options.mask.replace(/[0-9]/g,'_'));
|
input.val(options.mask.replace(/[0-9]/g,'_'));
|
||||||
@ -883,7 +883,7 @@
|
|||||||
delete datetimepicker;
|
delete datetimepicker;
|
||||||
input
|
input
|
||||||
.data( 'xdsoft_datetimepicker',null )
|
.data( 'xdsoft_datetimepicker',null )
|
||||||
.off( 'open.xdsoft focusin.xdsoft focusout.xdsoft mousedown.xdsoft blur.xdsoft' );
|
.off( 'open.xdsoft focusin.xdsoft focusout.xdsoft mousedown.xdsoft blur.xdsoft keydown.xdsoft' );
|
||||||
$(window).off('resize.xdsoft');
|
$(window).off('resize.xdsoft');
|
||||||
$([window,document.body]).off('mousedown.xdsoft');
|
$([window,document.body]).off('mousedown.xdsoft');
|
||||||
input.unmousewheel&&input.unmousewheel();
|
input.unmousewheel&&input.unmousewheel();
|
||||||
|
Loading…
Reference in New Issue
Block a user