1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    46
    Vote Rating
    0
    eaglefox12 is on a distinguished road

      0  

    Default Answered: How to format phone number in grid column in ext

    Answered: How to format phone number in grid column in ext


    I am trying to format phone number on a grid column from 1234567890 to 123-456-7890. I tried something of this sort to do...


    renderer: Ext.util.Format.dateRenderer('Y-m-d') but obviously this only works for date. Is there a way to render phone numbers?

  2. Lots of ways to do it... Here's one:

    Code:
    renderer: function(value) {
        return value.replace(/^(\d{3})(\d{3})(\d{4})$/, '$1-$2-$3');
    }

  3. #2
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,338
    Answers
    498
    Vote Rating
    248
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      0  

    Default


    Lots of ways to do it... Here's one:

    Code:
    renderer: function(value) {
        return value.replace(/^(\d{3})(\d{3})(\d{4})$/, '$1-$2-$3');
    }

  4. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    46
    Vote Rating
    0
    eaglefox12 is on a distinguished road

      0  

    Default


    Quote Originally Posted by skirtle View Post
    Lots of ways to do it... Here's one:

    Code:
    renderer: function(value) {
        return value.replace(/^(\d{3})(\d{3})(\d{4})$/, '$1-$2-$3');
    }
    Thank you skirtle... much appreciated

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar