Hemant
Hemant

Reputation: 83

How to set value of TimeField in extjs 4

I have tried setValue( Time ) which sets the display, but when we get this time then its returns 'null'("shiftTimearray.StartTime = null").

I'm using Ext.Version 4.2.1.

Here is my code where we are getting null even we have set Time in timefiled:

`shiftTimearray.StartTime = Ext.getCmp('startTime').getValue();

Upvotes: 0

Views: 1146

Answers (1)

incutonez
incutonez

Reputation: 3331

Without any further context/code, I can't reproduce your issue. Take a look at this Fiddle. Maybe you're not using the Date object as the value you're passing into setValue? According to the API, the value passed in must be an object, and looking at the source, the code checks to see if it's a date. Hope that helps.

Upvotes: 1

Related Questions