Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7947885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:33:34+00:00 2026-06-04T01:33:34+00:00

In sencha touch 2, it appears there are only string, int, float, boolean data

  • 0

In sencha touch 2, it appears there are only string, int, float, boolean data types. How then do I store a datetimes?

UPDATE

OK, I found I can use convert() to convert values: http://docs.sencha.com/touch/2-0/#!/api/Ext.data.Types

convert : Function A function to convert raw data values from a data
block into the data to be stored in the Field. The function is passed
the collowing parameters:
– v : Mixed
The data value as read by the
Reader, if undefined will use the configured defaultValue.
– rec : Mixed
The data object containing the row as read by the Reader. Depending on
the Reader type, this could be an Array (ArrayReader), an object
(JsonReader), or an XML element.

// Add a new Field data type which stores a VELatLong object in the Record.
Ext.data.Types.VELATLONG = {
    convert: function(v, data) {
        return new VELatLong(data.lat, data.long);
    },
    sortType: function(v) {
        return v.Latitude;  // When sorting, order by latitude
    },
    type: 'VELatLong'
};

But I do not really understand the code. For convert(), what sets the parameters? Why is the 1st param unused and when and what is it used for? How do I get/set such custom types (does it become v or data in convert())?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T01:33:35+00:00Added an answer on June 4, 2026 at 1:33 am

    Sencha Touch 1.0 supports date type in Model.

    However, Sencha Touch 2 only supports only 4 data types for Model.

    • String
    • Integer
    • Float
    • Boolean

    What you can do is you can put your date in String format and then later on convert it into
    date object using the API’s.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Developing a Sencha Touch MVC app that pulls data from json store (thats set
i am following sencha touch 2.0.0 MVC architecture. there are a tab panel in
I would like my store in Sencha touch to load a different PHP file
I'm using Sencha touch 2. I have store that load from existing js object:
On a sencha-touch, here's is my store declaration Ext.regStore('newsStore', { model: 'News', autoLoad: true,
I'm developing a Sencha Touch application that has multiple data stores. In order to
I am using Sencha Touch to capture data from a user on an iPad.
I am new to Sencha Touch framework. I need to load some data from
I am using Sencha Touch to display nested (associated) model data in a list
I am using sencha touch beta 3 version at the moment. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.