tracker issue : CF-4113472

select a category, or use search below
(searches all categories and all time range)
Title:

CFGrid: Cell value gets cleared, when the cell with date mask is selected on CF11

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): / Japanese Team (Anit Kumar Panda)

Created: 02/03/2016

Components: AJAX, UI Components

Versions: 11.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: 296330 /

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Mac 10 All,Win XP All

Vote Count: 0

Listed in the version 2016.0.02.299200 Issues Fixed doc
Verification notes: verified_fixed on September 30, 2019 using build 2016.0.02.299200
Problem: CFGrid: Cell value gets cleared, when the cell with date mask is selected on CF11

Method:Run the code and click on the date cell.

<cfscript> 
   variables.myQuery2 = queryNew("id,myDate"); 

   queryAddRow(variables.myQuery2,2); 
   querySetCell(variables.myQuery2,"id",1,1); 
   querySetCell(variables.myQuery2,"myDate","09/02/2005",1); 

   querySetCell(variables.myQuery2,"id",2,2); 
   querySetCell(variables.myQuery2,"myDate","09/03/2005",2); 
</cfscript>

<cfform name="myTest"> 
<cfgrid 
   name="myGrid2" 
   format="html" 
   selectmode="edit" 
   autowidth="true" 
   preservepageonsort="true" 
   striperows="yes" 
   query="variables.myQuery2" 
   width="360"
   title="Case 1: mask=m/d/y"> 

   <cfgridcolumn name="id"> 
   <cfgridcolumn name="myDate" mask="m/d/Y" type="Date">
</cfgrid> 
</cfform> 

<cfscript> 
   variables.myQuery1 = queryNew("id,myDate"); 

   queryAddRow(variables.myQuery1,2); 
   querySetCell(variables.myQuery1,"id",1,1); 
   querySetCell(variables.myQuery1,"myDate","2005/09/02",1); 

   querySetCell(variables.myQuery1,"id",2,2); 
   querySetCell(variables.myQuery1,"myDate","2005/09/03",2); 
</cfscript>

<cfform name="myTest"> 
<cfgrid 
   name="myGrid1" 
   format="html" 
   selectmode="edit" 
   autowidth="true" 
   preservepageonsort="true" 
   striperows="yes" 
   query="variables.myQuery1" 
   width="360"
   title="Case 2: mask=Y/m/d"
   > 

   <cfgridcolumn name="id"> 
   <cfgridcolumn name="myDate" mask="Y/m/d" type="Date">
</cfgrid> 
</cfform> 

<cfscript> 
   variables.myQuery3 = queryNew("id,myDate"); 

   queryAddRow(variables.myQuery3,2); 
   querySetCell(variables.myQuery3,"id",1,1); 
   querySetCell(variables.myQuery3,"myDate","2005/09/02",1); 

   querySetCell(variables.myQuery3,"id",2,2); 
   querySetCell(variables.myQuery3,"myDate","2005/09/03",2); 
</cfscript>

<cfform name="myTest"> 
<cfgrid 
   name="myGrid3" 
   format="html" 
   selectmode="edit" 
   autowidth="true" 
   preservepageonsort="true" 
   striperows="yes" 
   query="variables.myQuery3" 
   width="360"
   title="Case 3: mask=y/d/m"
   > 

   <cfgridcolumn name="id"> 
   <cfgridcolumn name="myDate" mask="Y/d/m" type="Date">
</cfgrid> 
</cfform> 

Result: Only "Case 1" will show the correct date. for rest of the cases, the cell value is cleared, when clicked.

Expected: It should open the calendar with specified date.

Additional Info:- Since the default format is m/d/y for ext.js, it works. Please see the " mask" info at https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-g-h/cfgridcolumn.html

Browser debugger shows the below errors:-
Uncaught TypeError: Cannot read property 'getDayOfYear' of null
$G.Actions.afterEdit @ cfgrid.js:797
Ext.define.fire @ ext-all.js:18
continueFireEvent @ ext-all.js:18
fireEvent @ ext-all.js:18
(anonymous function) @ ext-all.js:18
Ext.define.fire @ ext-all.js:18
continueFireEvent @ ext-all.js:18
fireEvent @ ext-all.js:18
Ext.define.onEditComplete @ ext-all.js:18
Ext.define.fire @ ext-all.js:18
continueFireEvent @ ext-all.js:18
fireEvent @ ext-all.js:18
Ext.define.completeEdit @ ext-all.js:18
Ext.define.onFieldBlur @ ext-all.js:18
b @ ext-all.js:18

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4113472

External Customer Info:
External Company: Katsuhito Oinuma
External Customer Name: Japanese Team
External Customer Email: mmsupport@samuraiz.co.jp

Attachments:

Comments:

This is happening on CF Version 2016,0,0,297892
Comment by Anit K.
4831 | February 03, 2016 12:27:45 PM GMT
Verified in CF2016, build # 298020. (Comment added from ex-user id:prk)
Comment by Adobe D.
4832 | February 25, 2016 04:09:30 AM GMT
test note
Comment by CFwatson U.
4833 | June 07, 2016 04:19:35 AM GMT
The fix for this bug is available as part of the early-access build for ColdFusion 2016 Update 2.
Comment by CFwatson U.
4834 | June 07, 2016 04:26:34 AM GMT
Verified this is partially fixed in CF2016 Update 1 (build 2016.0.01.298513). Clicking a date in an editable grid cell no longer clears the cell value. However, 2 issues remain: 1) This ticket should be removed from https://helpx.adobe.com/content/dam/help/attachments/cf2016-issues-fixed.pdf, because 1) the above Adobe comment "The fix for this bug is available as part of the early-access build for ColdFusion 2016 Update 2." and 2) on click and submit, the date is no longer in the format defined by the mask. See? If it isn't fully fixed until Update 2, then it shouldn't be listed in CF2016 Final's list of Issues Fixed. 2) A regression is introduced. The grid cell's calendar icon is no longer fully visible. Filed as CF-4199234. Thanks!, -Aaron
Comment by Aaron N.
4835 | July 23, 2017 09:27:14 PM GMT
Hi Adobe, I've verified this is fixed in CF2016 Update 2 (build 2016.0.02.299200). Please ignore my 07/23/2017 21:27:14 GMT comment. Thanks!, -Aaron
Comment by Aaron N.
31472 | September 30, 2019 06:48:16 AM GMT