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

is there any way to use AnyPicker to ionic 2 project #17

Open
niravjadatiya opened this issue Jun 1, 2017 · 2 comments
Open

is there any way to use AnyPicker to ionic 2 project #17

niravjadatiya opened this issue Jun 1, 2017 · 2 comments

Comments

@niravjadatiya
Copy link

hello,
currently i am working on ionic 2 project and i want to use this lib
please guide me proper way for installation

@jd0048
Copy link

jd0048 commented Jun 1, 2017

Same issue
please help us

@nehakadam
Copy link
Owner

I followed following steps to use AnyPicker in ionic3 project :

  1. Created a project using ionic blank template

  2. In assets folder, created "js" folder and added "jquery-1.11.0.min.js" and "anypicker.js" files.

  3. In assets folder, created "css" folder and added "anypicker-all.css" file.

  4. Added following code in "src/index.html" file ( Before main.js file ) -

    <script type="text/javascript" src="assets/js/jquery-1.11.0.min.js"></script>
    <script type="text/javascript" src="assets/js/anypicker.js"></script>

    <link href="assets/css/anypicker-all.css" rel="stylesheet">
  1. Added following code in "src/pages/home/home.html" file ( Inside ion-content ) -
    <p>Date : </p>
    <input type="text" id="ip-de" readonly>
  1. In "src/pages/home/home.ts" file -

    Added following code after import statements

    declare var $:any;

Added following code inside constructor function -

    $(document).ready(function()
    {
        $("#ip-de").AnyPicker(
	{
	    mode: "datetime",
  	    dateTimeFormat: "MMMM d, yyyy"
	});
    });

Tried in ionic version : 3.3.0

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

No branches or pull requests

3 participants