Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DataForm] unable to create editor of type DatePicker or TimePicker, while using metadata #218

Closed
tsonevn opened this issue Jun 19, 2017 · 2 comments

Comments

@tsonevn
Copy link

tsonevn commented Jun 19, 2017

An issue while generating editor of type DatePicker or TimePicker, while using metadata. For example:
HTML

<RadDataForm tkExampleTitle tkToggleNavButton  #myDataForm [source]="person" [metadata]="personMetadata"></RadDataForm>

Typescript

this.person={
    "name": "John",
    "age": 23,
    "email": "john@company.com",
    "city1": "New York",
    "street": "5th Avenue",
    "streetNumber": 11,
    "datefield":"2016-05-06"
    }
this.personMetadata = {
  "isReadOnly": false,
  "commitMode": "immediate",
  "validationMode": "immediate",
  "propertyAnnotations":
  [
    {
      "name": "name",
      "displayName": "Name",
      "groupName": "Main"
    },
    {
      "name": "age",
      "displayName": "Age",
      "editor": "Number",
      "groupName": "Main"
    },
    {
      "name": "email",
      "displayName": "E-Mail",
      "editor": "Email",
      "groupName": "Main"
    },
    {
      "name": "city1",
      "displayName": "City1",
      "editor": "Picker",
      "valuesProvider": ["New York", "Test", "Los Angeles"],
      "groupName": "Main2"
    },
    {
      "name": "street",
      "displayName": "Street Name",
      "groupName": "Main2"
    },
    {
      "name": "streetNumber",
      "displayName": "Street Number",
      "editor": "Number",
      "groupName": "Main2"
    },
    {
        "name": "datefield",
      "displayName": "datefield",
      "editor": "DatePicker",
      "groupName": "Main"
    }
  ]
}

Error:

-[__NSCFString isEqualToDate:]: unrecognized selector sent to instance 0x600000a46240
@maatthc
Copy link

maatthc commented Jun 22, 2018

A workaround is to repete the DatePicker on the HMTL, like here : https://github.com/maatthc/ns_dataform

@zbranzov
Copy link
Contributor

zbranzov commented Nov 8, 2018

The fix is released in nativescript-ui-dataform@3.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants