How to implement the DATE PICKER in PhoneGap? is there any alternative other than mobscroll. If I use Jquery I' m getting below error

191 Views Asked by At

How to implement the DATE PICKER in PhoneGap/Android? Some people are suggesting to use Mobicroll, I guess it is paid. So anyone please explain me in detail how to use a 3rd party tool/plugin for the datpicker usage in HTML

1

There are 1 best solutions below

0
Podile venkata krishna On

I guess Mobiscroll is paid one that too for huge amount. For 2 or 3 functionalities we cant ot go for Mobiscroll.

You can go for jQuery UI which have some options and you can go for Bootstrap also.

Include the jQuery CDN in your HTML file.

Here you need to carefully to do 2 things. Are you using the bootstrap or not?

If not, no problem. You can use Jquery UI datepicker.

If yes, you have to first include the Bootstrap CDN and after that you have to include jQuery CDN.

Copy the items like below. Otherwise you will get Uncaught TypeError:

$(...).datepicker is not a function.

(If you copy jQuery Items and after that if you copy Bootstrap)

<!-- Adding below 3 files for Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

<!--Adding below files for jQuery UI-->
<link href = "https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel = "stylesheet">
<script src = "https://code.jquery.com/jquery-1.10.2.js"></script>
<script src = "https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>