Data from SQLite Database to <input>?

Hi Ionic Developers,

I just want to ask if anyone managed to feed the data from a SQLite Database to the < Input > textbox? Specifically the “Date” and"Integer" datatypes? I have successfully feed some data. But it only feeds the String datatype. I am not sure why other datatype are not viewing.

Thank you.

Hi,

Normaly just with an ng-value with the correct fetched var it should work.
Can you post your code and make sur by a console log that you receive the correct data from you database ?

Check this module, maybe it would be helpful : https://github.com/abellion/ngDatabase

Hi @abellion,

It was successful when I am using ng-value and with a type = "text. But when I am trying to feed the data on a < input type =“date” >, it won’t appear. What could be the solution for this. BTW, I cannot feed it on a “text” input because I will be getting the data again as forms. It is like a dynamic < input > where the user can update records that were already saved.

Thank you :slight_smile:

BTW @abellion. Thanks for the ngDatabase. :slight_smile: But right now I am using SQLite. Which do you think is more reliable and secured?

Hi Everyone,

This issue isnot yet solved. Anyone got a workaround?

THanks.

As far i know there is no built in input type date in ionic.

I actually keep track of 2 different variables, one feeds the datepicker plugin, the other one is the one i use when i want to store in the sqlite db.

To feed the plugin, you should just go ahead and see what kind of format does the plugin needs. Then write a function that converts a Date variable to do desired format.

I know you might not understand that, feel free to ask :smile:

Did you try for integer input type=“number” or “tel” ?

For date you should take a look in momentjs