Hi, I use this code.
I use this to move threads on date of expiration. If you want only datepicker on input field, please follow this more easy tutorial:
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=5195&pid=1879
---------------------------------
-
Download your language and add on your server:
https://github.com/jquery/jquery-ui/tree/master/ui/i18n
- In newthread template,
after {$headerinclude} and <script type="text/javascript" src="{$mybb->asset_url}/jscripts/post.js?ver=1800"></script>
add:
- Settings in Custom Thread Fields for this date input field:
Input filed type: textbox
Text Mask Filter: Custom (regex) and write this: ^((?:19|20)\d\d)/(0?[1-9]|1[012])/(0?[1-9]|[12]\d|3[01])$
Input Formatter: <?=strtotime({VALUE})?>
Input Field HTML: yes and write this:
Display Format: <?=date('d-m-Y', {VALUE})?>
You should to have a thing like this:
Anyway this isn't perfect, when you edit a thread with this input field you will have to always edit this right date, because the date will be a string:
I still don't understand how to fix this
An old thread about this is also here: http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=4