Forum


11:03

29/04/2009

Hello,
I'm interested in attaching the datepicker to all input fields associated with a column that has a formatter setting of 'date'. What I really want to do is add the datepicker to the filtergrid multi-search feature… As a temporary solution I just bound datepicker to all inputs that contain '_date' in their name but that isn't a very general purpose solution.
Ideally (I think) I'd want to base the datepicker based on the formatter flag. I imagine there is a (reasonably) easy way I could use jQuery to get all the elements having a formatter of date and then bind datepicker to the associated filtergrid inputs. But I'm still relatively new to jQuery/jqGrid and haven't had much luck doing this myself yet.
Oh, and THANKS either way. jqGrid is great!
16:00

Moderators
30/10/2007

Hello,
I do not think that your approach is bad.
jqGrid is designed to give freedom, not ready solutions.
Imagine I attach a datepicker to all fields marked as date, but what will be if
1. not jQuery UI is used
2. The developer do not want to attach this datepicker
3. the developer do not want to attach datepicker as all.
In this case I should write a couple of not needed code with huge logic
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
16:02

29/04/2009

Thanks for your response Tony.
I'm not sure I really made myself clear though as I definitely agree that this isn't something that belongs in jqgrid itself. What I was hoping to learn was how I could use jquery to return the items from the colModel that have a specific formatter assigned.
I just found the getColProp() method though so I will look at that and see if I can figure out how to dynamically find all columns that have a formatter of 'date' specified.
Thanks again for jqGrid!
Most Users Ever Online: 715
Currently Online:
99 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66