Date Picker
Date Picker
Hi - hope someone can help. Im using Editor and have the following code to get a date picker.
{
"label": "<b>TransactionDate</b>",
"name": "TransactionDate",
"type": "date",
"def": "function () { return new Date(); }",
"dateFormat": "$.datepicker.ISO_8601"
},
This works in Chrome but not in Firefox or IE. Is there a workaround for this?
Ive got the following references:
<link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.4/css/jquery.dataTables.css">
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/tabletools/2.2.3/css/dataTables.tableTools.css">
<link rel="stylesheet" type="text/css" href="css/dataTables.editor.css">
<link rel="stylesheet" type="text/css" href="resources/syntax/shCore.css">
<link rel="stylesheet" type="text/css" href="resources/demo.css">
<style type="text/css" class="init"> </style>
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/1.10.4/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/tabletools/2.2.3/js/dataTables.tableTools.min.js"></script>
<script type="text/javascript" language="javascript" src="js/dataTables.editor.js"></script>
<script type="text/javascript" language="javascript" src="resources/syntax/shCore.js"></script>
Thanks
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Editor will use the
<input type="date">
HTML5 input type by default, which currently is only supported by Chrome (I really wish the others would hurry up and implement it!).What you can do to have a cross browser date picker is include jQuery UI's date picker. It looks like you have jQuery UI CSS, but you also need to include the jQuery UI Javascript. If the date picker widget it found the
date
input type will use that instead.Allan