How to add a new Input Field Type?
nier3 Offline
Member
***
Posts: 125
Joined: Jul 2012
Post: #18
RE: How to add a new Input Field Type?
I tried all combinations of format date but only this works Frown

Code:
1
2
3
4
5
6
7
<input type="text" class="textbox"{NAME_PROP}{MAXLE​​N_PROP}{WIDTH_PROP_SIZE}{TABINDE​X​_PROP}{REQUIRED_PROP} value="<if {VALUE} && !$mybb->input['my_post_key'] then><?=my_date('Y/m/d',{VALUE})?><else>{VALUE}</if>" id="datepicker" />
<link type="text/css" rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" />
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<script src="/datepicker-it.js"></script>
<script>
	$(function(){$('#datepicker').datepicker({dateFormat:'yy/mm/dd',autoSize:true});});
</script>


Other format dates, when I do preview thread or submit thread, it says Invalid value. It works only with Y/m/d Frown

But on showthread the format date is correct, that is dd-mm-yy because in Display Format I use <?=date('d-m-Y', {VALUE})?> so it's a problem only in newthread / edit post, but always better that string of before Biggrin Not a big problem

And now if I don't add a date and I edit the thread it's perfect, I haven't more 1970-01-01 so it's awesome Biggrin Yipi Yipi Thanks

09-22-2015 09:29 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: How to add a new Input Field Type? - nier3 - 09-22-2015 09:29 AM

 Standard Tools
Forum Jump: