Hey Vahid
thanks for creat persian date, but can i use this file (pdate.js) for gantt chart component vaer 1.2.2 extjs ??
thanks for answer my question
regard, mojtaba
Hi mojtaba .
Yes You can use this for any component that use Ext.Date. But you must change code for compatibily.
I use Ext.PDate for Extensible 1.5 . but change some code for compatibility with pdate
why does it returns date , like "2000-01-05" in datefield ?
i need persian date !!!
Hi
please give me source code
hi , this is a row of a grid(row-edit) :
Code:{ dataIndex:'birth_date',
text:'تاريخ تولذ',
width: 75,
align:'right',
hidden:true,
renderer : Ext.util.Format.dateRenderer('Y/m/d'),
editor: {xtype:'pdatefield' ,format: 'Y/m/d' ,allowBlank: true ,selectOnFocus:true ,maxLength:10 ,enforceMaxLength:true ,maxValue: new Date()}
You use Ext.util.Format.dateRenderer('Y/m/d') and this not retun Persian date. you can user custom renderer function and on this function use Ext.PDate.format
i don't know how can i implement a custom datarenderer . i'm begineer in EXt ! if you can , plz help me :)
Like this
Sorry I dont test this codeCode:{ dataIndex:'birth_date',
text:'تاريخ تولذ',
width: 75,
align:'right',
hidden:true,
renderer : function(v)
{
return Ext.PDate.format("Y/m/d",v);
},
editor: {xtype:'pdatefield' ,format: 'Y/m/d' ,allowBlank: true ,selectOnFocus:true ,maxLength:10 ,enforceMaxLength:true ,maxValue: new Date()}
thanks , but i test it and didn't work ! i don't know how can i do it , if you can help me
Code:{ dataIndex:'birth_date',
text:'تاريخ تولذ',
width: 75,
align:'right',
hidden:true,
renderer : function(v)
{
if(v && Ext.isDate(v)){
return Ext.PDate.format(v, "Y/m/d");
}
return v;
},
editor: {xtype:'pdatefield' ,format: 'Y/m/d' ,allowBlank: true ,selectOnFocus:true ,maxLength:10 ,enforceMaxLength:true ,maxValue: new Date()}