Html and angular | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Html and angular

I have <table> with <th>date</th. What should i wrote in <td> to show the user a Calendar to choose the date? And when i send that to my 'Api' level (in java) i need to get that date in 'long'. So how to convert that date (type of String) to type of long before i go to the Api level

4th Feb 2018, 12:57 AM
Netanel Elhadad
Netanel Elhadad - avatar
2 Answers
+ 1
Data types are language specific. They usually don't transfer in-between languages, espcially HTML and Java since HTML doesn't have data types. You would have to convert it to long after it was passed to Java.
11th Apr 2018, 11:31 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
0
Netanel Elhadad you can use a input element with type date. It'll display the calendar. In js/TS file you can convert to long or you can use pipes (in Angular)
23rd Jul 2020, 5:18 PM
paperinflames
paperinflames - avatar