GithubHelp home page GithubHelp logo

Comments (3)

twinssbc avatar twinssbc commented on July 29, 2024

@TomCosta you can use bower install to install the calendar control. It will download all js and css files into your bower_components folder by default, so it won't mess up your existing code.
Then you just need to refer to the demo/index.html to include the necessary js/css files and insert the calendar directive in your html file.

from ionic-calendar.

TomCosta avatar TomCosta commented on July 29, 2024

Thanks for the answer! But It's really difficult to understand.
I'm using Ionic, so after install using bower my files went to folder www/lib/ionic-calendar/demo...
How may I refer to "demo/index.html", if I already have an www/index.html and js/css files in my existing codes? I have to rename or replace it?
In my www/js/app.js file I have routes and controllers like this:
.state('app.agenda', {
url: '/agenda',
views: {
'menuContent': {
templateUrl: 'templates/agenda.html',
controller: 'AgendaCtrl'
},
'fabContent': {
template: ''
}
}
})
I would like to use some route like it to call your "Ionic-Calendar" inside the app.
After this, I would like to populate with a Json data from my API.
At this moment it just show the week days empty...
ionic-calendar
What is wrong at this point, how may I solve this?
Thanks in advance for the support.

from ionic-calendar.

twinssbc avatar twinssbc commented on July 29, 2024

@TomCosta The demo page just shows you how to use calendar in Ionic framework. You should add the calendar in your own html files.
As you can see, in demo/index.html page I add below lines in templates/home.html.

<calendar ng-model="calendar.currentDate" calendar-mode="calendar.mode" event-source="calendar.eventSource"
                      range-changed="reloadSource(startTime, endTime)"
                      event-selected="onEventSelected(event)" title-changed="onViewTitleChanged(title)"
                      time-selected="onTimeSelected(selectedTime)" step="30"></calendar>

You can add similar code in your own html file.
And the demo page also shows how to add reference to calendar.css and calendar-tpls.js, you also need to do the same in your index.html.
The calendarDemoCtrl.js shows you how to interact with the calendar, for example, pass data to the calendar.

Also if you open your browser dev tools, do you see any error printed out in the console?

from ionic-calendar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.