2013-06-19 15 views
0

我有問題,我numberfield它看起來像這樣 ExtJS的版本3.4的ExtJS爲什麼我numberfeld不接受小數

{ 
       xtype: 'numberfield', 
       fieldLabel: 'Cena', 
       name: 'Price', 
       id: 'Price', 
       allowNegative: false, 
       width: 200, 
       allowBlank: false, 
       decimalPrecision:2, 
       blankText: "Proszę podać cenę produktu" 
      } 

但是當我把99.99那麼它不是有效 只接受99

回答

1

問題不在於您發佈的代碼中。測試它在this fiddle,和它的工作原理:

Ext.create({ 
    renderTo: Ext.getBody(), 

    xtype: 'numberfield', 
    fieldLabel: 'Cena', 
    name: 'Price', 
    id: 'Price', 
    allowNegative: false, 
    width: 200, 
    allowBlank: false, 
    decimalPrecision:2, 
    blankText: "Proszę podać cenę produktu" 
}); 
+0

葉對不起,你是對的我檢查過,但是當我把 形成99.99 然後在我的動作控制器具有值0 但沒有precssion是確定99 = 99 – Dox

相關問題