MyBB Hacks

Full Version: Datepicker in custom thread field
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am using a custom thread fields as date and would like to add a datepicker to fill the textbox. i am using this script http://www.formget.com/jquery-datepicker/

and using this code in "Input Field HTML " option

Code:
<link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css"/ >
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.0/jquery-ui.js"></script>

<input name="selected_date" id="datepicker" type="text" class="textbox"{NAME_PROP}{MAXLEN_PROP}{WIDTH_PROP_SIZE}{TABINDEX_PROP}{REQUIRED_PROP} value="{VALUE}" />

<script>
$(document).ready(function() {
// Datepicker Popups calender to Choose date.
$(function() {
$("#datepicker").datepicker();
// Pass the user selected date format.
$("#format").change(function() {
$("#datepicker").datepicker("option", "dateFormat", $(this).val());
});
});
});
</script>


Its working proper . but when i click on post thread for posting , its not showing value and then i go to editpost its show blank field .
Whats wrong , Please Help Frown

Try getting rid of

Code:
name="selected_date" 


Also check the generated HTML for issues.

Now its showing in preview post . but not showing after post/update post . when i go return by edit post its show blank field Frown
Reference URL's