Closed tmeme closed 8 years ago
Thank you for reporting a bug! Please download a latest version and check.
fixed
update to latest version when value change; 0undefinedundefinedundefined-undefinedundefinedundefined-undefinedundefinedundefined
I could not reproduce error. Please check parameters of setOutput
callback function in Documentation.
If error is not solved then post entire code the way you posted at first, so that I can check for a particular test case. Also mention OS, browser and browser version on which you are testing.
<script type="text/javascript">
$(document).ready(function()
{
$("#ip-de").AnyPicker(
{
mode: "datetime",
viewSections:
{
header: ["cancelButton", "headerTitle","setButton"],
contentTop: [],
contentBottom: [],
footer: ["cancelButton", "headerTitle","setButton"]
},
layout: "fixed",
dateTimeFormat: "yyyy-MM-dd",
theme:"iOS",
//rowHeight:108*(window.innerWidth || document.documentElement.clientWidth)/1242,
minValue: new Date(),
maxValue: new Date(new Date().getTime()+1000*60*60*24*7),
setOutput:function(val){
console.log(val);
if(!(new Date(val).getTime()) ){
var s = new Date(new Date().getTime()+1000*60*60*24*1),
year = s.getFullYear(),
m = s.getMonth()+1 >10 ? s.getMonth()+1 : "0"+(s.getMonth()+1),
d = s.getDay();
val = year +"-"+m+"-"+d;
}
if(new Date(val).getTime() ){
}
}
});
});
</script>
<button id="ip-de" readonly>button</button>
There is an issue with this when non-input element is used. If <input type="text" id="ip-de" readonly>
is used then this issue is not detected.
I know it's too late but posting comment so that it may help someone else.
Please go through NonInputElement.htm as an example of implementing AnyPicker with Non Input Element.