Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript X-可编辑日期格式_Javascript_Jquery_X Editable - Fatal编程技术网

Javascript X-可编辑日期格式

Javascript X-可编辑日期格式,javascript,jquery,x-editable,Javascript,Jquery,X Editable,对于X-可编辑的日期字段,我有以下JS和HTML。从日历弹出窗口中选择日期后,我将在输入框中看到“Wed Apr 13 2016 20:00:00 GMT-0400(东部标准时间)”作为新值。而且它不是我已经指定的格式“mm/dd/yyyy” <input style="background-color: rgb(255, 255, 255);" title="" data-original-title="" class="editable editable-cli

对于X-可编辑的日期字段,我有以下JS和HTML。从日历弹出窗口中选择日期后,我将在输入框中看到“Wed Apr 13 2016 20:00:00 GMT-0400(东部标准时间)”作为新值。而且它不是我已经指定的格式“mm/dd/yyyy”

<input style="background-color: rgb(255, 255, 255);" 
   title="" 
   data-original-title="" 
   class="editable editable-click dateinput form-control" 
   data-clear="false" 
   data-format="mm/dd/yyyy" 
   data-type="date" 
   id="my_date" 
   name="my_date" 
   required="required" 
   value="12/31/2016" 
   type="text">

<script>     
$("#my_date").editable({
             send: 'never',
             success: function(response, newValue) {
                    $('#my_date').val(newValue);
             }
});       
</script>

$(“#我的日期”)。可编辑({
发送:“从不”,
成功:函数(响应,newValue){
$('my#u date').val(newValue);
}
});       

请这样尝试。在
js
文件中放入
日期格式,如下所示

<script>     
$("#my_date").editable({
             format: 'mm/dd/yyyy',    
             send: 'never',
             success: function(response, newValue) {
                    $('#my_date').val(newValue);
             }
});       
</script>

$(“#我的日期”)。可编辑({
格式:“mm/dd/yyyy”,
发送:“从不”,
成功:函数(响应,newValue){
$('my#u date').val(newValue);
}
});