Results 1 to 2 of 2

Thread: Set value in a date field in a grid cell

  1. #1
    Sencha Premium Member
    Join Date
    Nov 2014
    Vote Rating

    Default Set value in a date field in a grid cell


    I have a grid in which the second column is a date field.
    What is the ST code for adding a value for date, in any row of this grid?

    Thank you,

  2. #2
    Sencha - Sales Team's Avatar
    Join Date
    Apr 2009
    Redwood City, CA
    Vote Rating


    Please take a look at the example test suite below. This shows how to use the Futures APIs to replicate a user's interactions with the cell editing plugin on a grid, and interact with the date picker to set the date, then check the updated value in the grid.

    This test suite can be run against the following example in the Kitchen Sink:

    describe('Editable grid', function() {
        it('Should edit the cell when clicked', function() {
            // Reference the cell containing the date field and click it
            // If the grid is using the cell editing plugin, it will become editable
        it('Should display the date picker and select the current date', function() {
            // Click on the date picker's trigger
            // Check date picker is visible
            // Click the "Today" button in the date picker
            ST.component('datepicker button[text=Today]')
            // Click away from the cell - click on the grid header
            ST.component('cell-editing header')
        it('Should have the correct date in the grid cell', function() {
            // Get the current date as a formatted string
            var currentDate = new Date().toLocaleDateString("en-US", {
                year: "numeric", 
                month: "short",
                day: "2-digit"
            // Check the cell value matches current date
    Daniel Gallo
    Senior Solutions Architect
    Sencha Inc.

Similar Threads

  1. Replies: 1
    Last Post: 29 Mar 2016, 5:41 AM
  2. [DUP] Date field cell editor hidden when selecting year
    By mankz in forum Ext 5: Bugs
    Replies: 1
    Last Post: 29 Aug 2014, 9:16 AM
  3. cant edit date field with current date in editable grid
    By sthanar in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 13 Jan 2014, 9:45 AM
  4. Replies: 2
    Last Post: 12 Apr 2012, 8:17 AM
  5. wrong value on the grid's date field if date is blank
    By hellosudhir in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 10 Jan 2011, 4:13 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts