Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 39

Thread: Ext.PDate [4] (Extjs persian date) with date picker and date field

  1. #11
    Sencha User
    Join Date
    Dec 2011
    Posts
    5
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by vahid4134 View Post
    Hy
    I create Ext.PDate with date picker and date field for persian date in Ext 4.
    this is good example for full support I18n in date


    Update 30 Nov 2011

    update for Ext 4.0.7 and fix some bug. now in github

    https://github.com/vahid-sohrabloo/Ext.Pdate
    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

  2. #12
    Sencha User
    Join Date
    Oct 2007
    Location
    Iran
    Posts
    167
    Vote Rating
    0
      0  

    Default

    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
    No honor is like knowledge

  3. #13
    Sencha User masoud_tamizy's Avatar
    Join Date
    Oct 2011
    Posts
    108
    Vote Rating
    0
      0  

    Default

    why does it returns date , like "2000-01-05" in datefield ?
    i need persian date !!!

  4. #14
    Sencha User
    Join Date
    Oct 2007
    Location
    Iran
    Posts
    167
    Vote Rating
    0
      0  

    Default

    Hi
    please give me source code
    No honor is like knowledge

  5. #15
    Sencha User masoud_tamizy's Avatar
    Join Date
    Oct 2011
    Posts
    108
    Vote Rating
    0
      0  

    Default tnx

    Quote Originally Posted by vahid4134 View Post
    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()}

  6. #16
    Sencha User
    Join Date
    Oct 2007
    Location
    Iran
    Posts
    167
    Vote Rating
    0
      0  

    Default

    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
    No honor is like knowledge

  7. #17
    Sencha User masoud_tamizy's Avatar
    Join Date
    Oct 2011
    Posts
    108
    Vote Rating
    0
      0  

    Default datarenderer

    i don't know how can i implement a custom datarenderer . i'm begineer in EXt ! if you can , plz help me

  8. #18
    Sencha User
    Join Date
    Oct 2007
    Location
    Iran
    Posts
    167
    Vote Rating
    0
      0  

    Default

    Like this
    Code:
    {   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()}
    Sorry I dont test this code
    No honor is like knowledge

  9. #19
    Sencha User masoud_tamizy's Avatar
    Join Date
    Oct 2011
    Posts
    108
    Vote Rating
    0
      0  

    Default

    thanks , but i test it and didn't work ! i don't know how can i do it , if you can help me

  10. #20
    Sencha User
    Join Date
    Oct 2007
    Location
    Iran
    Posts
    167
    Vote Rating
    0
      0  

    Default

    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()}
    No honor is like knowledge

Page 2 of 4 FirstFirst 1234 LastLast

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
  •