-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date and Datetime fields when editing #997
Comments
Hello, Thank you. The validator works only with type of data and type time and not datetime. I have added support in parseDate function to check date-time field, but it is not very well tested. Kind Regards |
Hi Tony, That sounds just great. Thanks. |
Hello, Can you please provide a example of that? Thanks |
Hi Tony, Providing an example is always a challenge for me. In my environment I have created a kind of "generator" on the server which automatically produces the client-side configuration. It produces a HUGE and very complicated code as it supports almost all the features that jqGrid has to offer (just for future flexibility). If I need to produce a demo code I cannot use this generator environment and have to start from zero and make it. Thanks, |
Hi Tony, Sorry again that I did not help with preparing the example for you debug this issue properly. It's exactly the same as the original problem I told you about (above). The datetime input expects this "T" as a separator between the date and time. In the main grid I'm using formatoptions/newformat: 'Y-m-d H:i'. This means the grid text has this "space" instead of a "T" (for readability). When you open the edit-form and copy the value to the INPUT fields, the default un-format does not replace this space back into "T". Then the $('input').val(grid-value) statement cannot process correctly. |
Hello,
I'm working with revision 5.5.5 of jqGrid.
Currently the documents do not mention support for column types "date" and "datetime-local" when editing. I have found by experience that actually those types CAN be used and can (almost) work well.
The only issue now is that the validator is rejecting the values. Looks like the validator is trying to use the "formatoptions.newformat" for validating. I believe this is not optimal. The format created by the browser is something like: "yyyy-mm-ddTHH-MM-SS" (note the "T" in the middle). The validator is always failing due to this. Probably there should be a separate parameter for input validation template.
I have been able to overcome this issue by using the custom validator.
If and when possible, I would recommend adding proper support for these field types as I'm sure many users would love to use them.
The text was updated successfully, but these errors were encountered: