Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
Can't input dates
Tags: datefmt
26/03/2010
08:08
Avatar
glittle
Member
Members
Forum Posts: 31
Member Since:
23/01/2010
sp_UserOfflineSmall Offline

When in cell edit mode, or in a form edit, I cannot enter a date...

Here is the model:

{name:'HireDate',index:'HireDate',width:100,search:false,resizable:false,label:'<span title="Hire Date\n(Editable)" class="editable">Hire Date</span>',groupName:'Legacy Data',classes:'editable',editable:true,align:'center',formatter:'date',datefmt:'M d, Y',editrules:{date:true},formatoptions:{newformat:'M d, Y',srcformat:'Y-m-d'}},

When I enter "Oct 01, 2008", I get an error like this:

Hire Date: Please, enter valid date value - M d, Y

What else needs to be done?

Glen

31/03/2010
16:43
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Currently the date validator check only dates with / - . separators

In order to resolve the issue, please define your own validator:

http://www.trirand.com/jqgridw.....#editrules

Best 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.

09/04/2010
07:34
Avatar
glittle
Member
Members
Forum Posts: 31
Member Since:
23/01/2010
sp_UserOfflineSmall Offline

I've added my own date validator, but it not being called...

Here is the column model:

{name:'HireDate',index:'HireDate',width:100,search:false,resizable:false,label:'<span title="Hire Date\n(Editable)" class="editable">Hire Date</span>',groupName:'Legacy Data',classes:'editable',editable:true,align:'center',formatter:'date',datefmt:'M d, Y',editrules:{date:true,custom:true,custom_func:DateValidator},formatoptions:{newformat:'M d, Y',srcformat:'Y-m-d'}},

Is there any setting in there that would cause my DateValidator() to not be called? 

I still get the same error message when saving the form.

09/04/2010
20:14
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

You should remove the date:true form editrules

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
45 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information