Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Datepicker in custom thread field
mat22 Offline
Junior Member
**
Posts: 5
Joined: Sep 2013
Post: #1
Datepicker in custom thread field
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:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<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

09-17-2014 03:38 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Datepicker in custom thread field
Try getting rid of

Code:
name="selected_date" 


Also check the generated HTML for issues.


My Blog
09-18-2014 11:16 AM
Find all posts by this user Quote this message in a reply
mat22 Offline
Junior Member
**
Posts: 5
Joined: Sep 2013
Post: #3
RE: Datepicker in custom thread field
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
(This post was last modified: 09-18-2014 04:55 PM by mat22.)
09-18-2014 04:31 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: