[ 2 posts ]

Sandeep Shenoy

  • Username: Sandeep31619
  • Joined: Wed May 30, 2012 4:28 pm
  • Posts: 1
  • IRC: NarutoUzumaki
  • Offline
  • Profile

Quick Edit a DataTable which has a Date field??!!

Post Posted: Wed May 30, 2012 4:40 pm
+0-
Hello Guys,

I am having a situation where i am populating a DataTable with 5 columns out of which the last one is a DATE field.

For JavaScripts from YUI i am using Calendar Control and DataTable related scripts.

Problem: I am unable to get the Calendar popup when I click on Quick Edit button. All the cells in the DATE column gets converted to TextBox, BUT when I click in text box, calendar doesn't popup!!???

Below is how the column is defined:

...
{
key:"plannedStartDate",
label:"Planned Start Date",
resizeable: true,
sortable: true,
formatter: YAHOO.widget.DataTable.formatDate,
editor: new YAHOO.widget.DateCellEditor(),
quickEdit: {
validation: {
fn: function(e) {
if (e.value == "31-31-9999") {
this.displayQuickEditMessage(e, 'What?!', 'error');
return false;
}
else {
return true;
}
}
}
}
}
...

Any help would be highly appreciated!!

PEACE,
Sandeep

John Lindal

YUI Contributor

  • Username: jafl
  • Joined: Mon Nov 02, 2009 2:33 pm
  • Posts: 352
  • Location: Los Angeles, CA
  • Twitter: jafl5272
  • GitHub: jafl
  • Gists: jafl
  • Offline
  • Profile

Re: Quick Edit a DataTable which has a Date field??!!

Post Posted: Mon Jun 04, 2012 8:22 am
+0-
The documentation explains that QuickEdit uses a completely separate set of formatters:

http://jafl.github.com/yui2/quickedit/y ... Table.html

You need to write a custom formatter that attaches a popup calendar to the input field displayed in the cell.
  [ 2 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum