vjain
2 Jul 2012, 11:21 PM
Extjs v 4.x
1) Create a grid and add a coulmn of type 'timefield' in grid with renderer of format ('h:i A').
2) Add a row and mke a selection in 'timefield' column, say 4:00 AM.
3) Add another adjecent row and select the same data i.e. 4:00 AM in the dropdown. You will not be able to do this action, and you need to select another time and then come back to the initial selection. It lloks to be an ExtJS bug.
Thanks,
Vikas
sword-it
3 Jul 2012, 3:31 AM
Hi
You can use following code ,its working fine for timefield
Ext.create('Ext.grid.Panel', {
title: 'EditorGrid'
, renderTo: Ext.getBody()
, selType: 'rowmodel'
, plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
clicksToEdit: 1
})
]
, height:200
, width: 500
, store: new Ext.data.Store({
data: {
item: [
{
name: 'xyz'
, address: 'sssssss'
, email: 'xyz@ss.com'
, starttime:'4:00 AM'
},
{
name: 'abc'
, address: 'ggggg'
, email: 'xyz@ss.com'
, starttime: '6:00 AM'
},
{
name: 'ttt'
, address: 'dddd'
, email: 'xyz@ss.com'
, starttime: '8:00 AM'
}
]
}
, fields: ['name', 'address', 'email', 'starttime']
, proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'item'
}
}
})
, columns:[
{
header: 'Name'
, dataIndex: 'name'
},
{
header: 'Address'
, dataIndex: 'address'
},
{
header: 'Email'
, dataIndex: 'email'
},
{
header: 'Start Time'
, dataIndex: 'starttime'
, field: {
xtype: 'timefield'
, minValue: '4:00'
, maxValue: '8:00'
, increment: 30
, format:'h:i A'
}
}
]
});
The timefield appears fine, but the problem remains. The problem is that on 2 adjacent rows, I cannot select same value for timefield for the first time.
Thanks,
Vikas
maikhorma
26 Feb 2013, 5:59 PM
Thought maybe it was just because of some overrides I had but I've got the same thing. My workaround is adding this to my editor's 'beforeedit'
editor.editor.down('[@name=time]').clearValue();
not pretty but gets the job done.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.