<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: checkDate used for editrules: { date: true } works with too many restrictions</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/checkdate-used-for-editrules-date-true-works-with-too-many-restrictions</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/bugs/checkdate-used-for-editrules-date-true-works-with-too-many-restrictions/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on checkDate used for editrules: { date: true } works with too many restrictions</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/checkdate-used-for-editrules-date-true-works-with-too-many-restrictions#p28080</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/checkdate-used-for-editrules-date-true-works-with-too-many-restrictions#p28080</guid>
        	        	<description><![CDATA[<p>Hello Oleg,</p>
<p>This is a thing whch we have discused a long time, but I never get chance to fix it.</p>
<p>We need to use only one common method for date&#160; (comapring, parsing and etc) (which I think it should be present in the base module)</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sun, 20 Jan 2013 13:01:12 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on checkDate used for editrules: { date: true } works with too many restrictions</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/checkdate-used-for-editrules-date-true-works-with-too-many-restrictions#p28018</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/checkdate-used-for-editrules-date-true-works-with-too-many-restrictions#p28018</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p>I&#39;m surprised, but <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.common.js#L480-L554" target="_blank">$.jgrid.checkDate</a> used in case of usage <strong>editrules: { date: true }</strong> works correctly only in case of very strict restrictions. For example if one use <strong>formatoptions.newformat</strong> or <strong>datefmt</strong> in form of <strong>$.jgrid.formatter.date.masks</strong> (like <strong>formatoptions: {newformat: "ShortDate"}</strong>) one get error message with correct formatted dates. The formats like "<strong>n/j/Y</strong>" (standard date format from <em>grid.locale-en.js</em>) don&#39;t work too (just try <strong></strong><strong>formatoptions: {newformat: "</strong><strong>n/j/Y</strong>"}).</p>
<p>If seems that <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.common.js#L480-L554" target="_blank">$.jgrid.checkDate</a>&#160;woks only if the format of the date use "y", "m" and "d" only. <a href="/blog/nd.com/jqgridwiki/doku.php?id=wiki:common_rules#editrules" target="_blank">The documentation</a> describes that datefmt uses. On the other side <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.common.js#L637-L641" target="_blank">the source code</a> prefer&#160;<strong>formatoptions.newformat</strong>&#160;and uses&#160;<strong>datefmt</strong>&#160;only if <strong>formatoptions.newformat</strong>&#160;is not defined.</p>
<p>If would be good to use some common other existing code, like <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.base.js#L82-L142" target="_blank">$.jqgrid.parseDate</a> or <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/jquery.fmatter.js#L121-L254" target="_blank">$.fmatter.util.DateFormat</a>. If would be good to move the common part of function <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.base.js#L82-L142" target="_blank">$.jqgrid.parseDate</a>&#160;and&#160;<a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/jquery.fmatter.js#L121-L254" target="_blank">$.fmatter.util.DateFormat</a>&#160;in separate place and make all thre methods <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.common.js#L480-L554" target="_blank">$.jgrid.checkDate</a>, <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.base.js#L82-L142" target="_blank">$.jqgrid.parseDate</a>&#160;and&#160;<a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/jquery.fmatter.js#L121-L254" target="_blank">$.fmatter.util.DateFormat</a>&#160;use the common parsing method.</p>
<p>In any way would be nice to fix the code of documantation to describe the current restrictions of <strong>editrules: { date: true }</strong>.</p>
<p>Best regards<br />Oleg&#160;</p>
]]></description>
        	        	<pubDate>Mon, 14 Jan 2013 20:17:27 +0200</pubDate>
        </item>
</channel>
</rss>