最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

jqgrid date formatter from and to formats - Stack Overflow

programmeradmin1浏览0评论

I have the date coming in as 30-Oct-24 and I need it displayed as 30-Oct-2024 and also need to be able to sort by date

I have this code but it's not working and showing gibberish strings instead

 formatter: 'date', formatoptions: { srcformat: 'd-MMM-yy', newformat: 'dd-MMM-yyyy' }, sorttype: 'date'

Is there a list of date formats for JqGrid that I can find somewhere? This should work but does not.

I have the date coming in as 30-Oct-24 and I need it displayed as 30-Oct-2024 and also need to be able to sort by date

I have this code but it's not working and showing gibberish strings instead

 formatter: 'date', formatoptions: { srcformat: 'd-MMM-yy', newformat: 'dd-MMM-yyyy' }, sorttype: 'date'

Is there a list of date formats for JqGrid that I can find somewhere? This should work but does not.

Share Improve this question asked Nov 21, 2024 at 1:53 sarsnakesarsnake 27.7k62 gold badges185 silver badges294 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

jqGrid follow the php date formatting. This is described into the documentation

In your case you can try with:

... srcformat : 'd-M-y', newformat : 'd-M-Y' ,...
发布评论

评论列表(0)

  1. 暂无评论