cancel
Showing results for 
Search instead for 
Did you mean: 

Null value for Date in HWC app

Former Member
0 Kudos

Hello,

We are developing a Hybrid web application.

In which, we are passing dates as a input.

When we run the application in device, the date field shows the current Date by default.

Can we set null or blank(no value) in date field?

Kindly help

Regards

Ajay

Accepted Solutions (1)

Accepted Solutions (1)

midhun_vp
Active Contributor
0 Kudos

Give more information on the requirement.

When you want get a null value from date field. Attach a screen of the screen.

- Midhun VP

Former Member
0 Kudos

Hi Midhun,

We are trying to fetch data between the date range, as follows:

But, when this screen loads into the device, the date fields display the current Date by default.

These date fields are edit boxes, with Logical type as Date.

And, we have a requirement to keep these fields blank(as displaying no value by default).

Kindly help.

Thanks & Regards

Ajay

former_member186566
Active Participant
0 Kudos

Hi

document.getElementById("date1_attribute").value="";

document.getElementById("date2_attribute").value="";

}

date1_attribute and date2_attribute are the attribute value that you can find in workflow html.

Regards

Yokesvaran Kumarasamy

Former Member
0 Kudos

Hello Yokesvaran,

Thanks for the solution.

I can find three html files as below  :

Hybridapp_custom.html,

Hybridapp_jqm.html,

Hybridapp.html

Can you please tell me which html file to refer??

Thanks & regards

Ajay

former_member186566
Active Participant
0 Kudos

Hi

Former Member
0 Kudos

Hello Yokesvaran,

We are using Android 4.1.2

We tried by setting value of attribute value to null in custom.js file as you mentioned above.

But, still in device we are getting default date as current date.

Please advice.

Thanks & regards

Ajay

former_member186566
Active Participant
0 Kudos

Hi Ajay

Which version of SUP you are using?

Did you check the attribute(id) values for the date1 and date2 tag of the input box.

You should use the same attribute(id) value in custom js file. pls refer the attached screen.

Custom.js

date1_attribute and date2_attribute should be same in html and custom.js

if you are using the screentoshow function check the screen name or remove for time being, then deploy and test the application.

Please share the screen shot if you still have issues.

Regards

Yokesvaran Kumarasamy

Former Member
0 Kudos

Thanks a lot Yokesvaran.

I had selected update generated code mistakenly after editing html file , my bad.

It works just fine.

Regards

Ajay

former_member186566
Active Participant
0 Kudos

Great!! good to hear that.

Regards

Yokesvaran Kumarasamy

Answers (0)