Jump to content

UniPropertyGrid Tarihi değerinin dönüş formatı


aliemre

Recommended Posts

Merhaba,

 

UniPropertyGrid de aşağıdaki gibi bir konfigürasyon tanımladım. MaxDate ve MinDate değeri ProperyChange event ına düştüğünde PropValue 'Tue Nov 21 2017 00:00:00 GMT+0300 (Turkey Standard Time)'  gibi bir değer döndürüyor. Bunu yyyy.mm.dd gibi döndürmek mümkün mü ?

 

submitFormat ve formatText parametrelerini denedim. Durum değişmedi.

 

 

function beforeInit(sender, config)
{
  config.sourceConfig  = 
    {
  
       DateFormat:  {editor: Ext.create('Ext.form.field.ComboBox', {
                store: [ 'dd.MM.yyyy', 'dd.MMM.yyyy, ddd', 'yyyy-MM.dd HH:mm'],
                queryMode: 'local'
            }) },
       DateMode:  {editor: Ext.create('Ext.form.field.ComboBox', {
                store: [ 'dtmDateOnly', 'dtmDateTime'],
                queryMode: 'local'
            }) },   
       Kind:  {editor: Ext.create('Ext.form.field.ComboBox', {
                store: [ 'tUniDate', 'tUniDateTime','tUniTime'],
                queryMode: 'local'
            }) },  
       MaxDate: {editor: Ext.create('Ext.form.field.Date', { formatText:'Y.m.d', submitFormat:'Y.m.d' }) },
       MinDate: {editor: Ext.create('Ext.form.field.Date', { formatText:'Y.m.d', submitFormat:'Y.m.d' }) },  
      GridMode:{editor: Ext.create('Ext.form.field.ComboBox', {
                store: [ 'lgmPostKeyValue', 'lgmPostListValue'],
                queryMode: 'local'
            }) },  
      ListOnlyMode:{editor: Ext.create('Ext.form.field.ComboBox', {
                store: [ 'lmNoFollow', 'lmFollowSource'],
                queryMode: 'local'
            }) }, 
      Style:{editor: Ext.create('Ext.form.field.ComboBox', {
                store: [ 'csDropDown', 'csDropDownList','csOwnerDrawFixed', 'csOwnerDrawVariable', 'csSimple'],
                queryMode: 'local'
            }) },                      
    }
}
Link to comment
Share on other sites

Aşağıdaki kodu client a en kolay nasıl gönderebilirim ?

 

 

O54B.events.propertychange.listeners[0].fireFn =  (function (P0, P1, P2, P3) {
return Ext.Ajax.request({
url: "/HandleEvent",
params: "Ajax=1&IsEvent=1&Obj=O54B&Evt=propertychange&recid=" + P1 + "&val=" + P2.toISOString() + "&oldval=" + P3.toISOString() + "" + _gv_(O49E),
success: AjaxSuccess,
failure: AjaxFailure,
obj: O54B,
e: "propertychange"
});
});
Link to comment
Share on other sites

Tamam hallettim Aşağıdaki gibi bir yöntem ile olabiliyormuş. teşekkür ederim.

function propertychange(source, recordId, value, oldValue, eOpts)
{
   debugger;
   this.events.propertychange.listeners[1].fireFn = function() {};
   
   if (value instanceof Date && !isNaN(value.valueOf()))
       value = formatAsISO(value)
       
   if (oldValue instanceof Date && !isNaN(oldValue.valueOf()))
       oldValue = formatAsISO(oldValue);
       
   return Ext.Ajax.request({
        url: "/HandleEvent",
        params: "Ajax=1&IsEvent=1&Obj="+this.nm+"&Evt=propertychange&recid=" + recordId + "&val=" + value + "&oldval=" + oldValue + "" + _gv_(this.uform),
        success: AjaxSuccess,
        failure: AjaxFailure,
        obj: this,
        e: "propertychange"
    });
}
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...