Comments (13)
With the code example I gave in reply to that question you should be able to do this? #12 (comment)
There is one side note though, since you want to remove the old events. You can remove these by setting the length of the array to 0, so call eventsArray.length = 0
before pushing new objects to the array.
from jqm-calendar.
BTW, hHas there been a blogpost about this calendar or something? There is a reasonable amount of activity in this repository lately 😄
from jqm-calendar.
It works :D
Hehe not really, maybe Im just being annoying this last couple of days ;-)
I dont know why that didnt work before but I tried all ways possible!!! I was resettign the array using *eventsArray = [] * and that didnt do anything grrrr
Thanks for the prompt reply !!!
from jqm-calendar.
Hehe no not just you, have had some forks and stars as well ^_^
But great that its working now. It didn't work because when you do eventsArray = []
you initialise a new array, and let the eventsArray variable reference to that. Internally, however, the calendar instance still refers to the old array (it doesn't even know the variable eventsArray
exists).
When you use the eventsArray.length = 0
method, you alter the same array instance as the one the calendar uses. It's a bit of a hack and it's quite sad that Javascript doesn't provide a way to clear an array (or even delete one element - split
creates a new array as well).
from jqm-calendar.
very nice post jQM Calendar
but i am facing problem is that
how to disable previous date from current date.
suppose current date 05/06/2014(dd/mm/yyyy)
disable 05/06/2014 previous date to onwards
from jqm-calendar.
Try something like this at line 110 in the addCell($row, date, darker, selected)
-function:
var $td = $("<td class='ui-body-" + plugin.settings.theme + "'/>").appendTo($row),
$a = $("<a href='#' class='ui-btn ui-btn-up-" + plugin.settings.theme + "'/>")
.html(date.getDate().toString())
// .click(cellClickHandler) <-- comment this one out, you want to prevent click handler
.data('date', date)
.appendTo($td);
// Compare the date for this cell with today (stored as a variable in the plugin scope)
if ( date.getTime() >= today.getTime() ) {
$a.addClass("darker"); // It looks disabled
} else {
$a.click(cellClickHandler); // Click handler should work for enabled dates;
}
from jqm-calendar.
very nice post jQM Calendar
my question is that
suppose today date is 06/06/2014(dd/mm/yyyy)
disable previous date from today date
my calendar look like this
suppose if user select date from calendar 27/06/2014(dd/mm/yyyy)
my calendar look like this (this is the check in date)
check out date starts from 28/06/2014(dd/mm/yyyy)
my calendar look like this
27/06/2014 previous date will be disabled how to possible?please reply
from jqm-calendar.
Ah I thought you wanted to disable the past dates instead of disabling the days before a specific (selected date). Change the today variable to a variable that stores the selected date:
if ( date.getTime() >= selectedDate.getTime() ) { // Not today
$a.addClass("darker"); // It looks disabled
} else {
$a.click(cellClickHandler); // Click handler should work for enabled dates;
}
from jqm-calendar.
My question is that today date is 09/06/2014(dd/mm/yyyy)
user can not choose these dates like 08/06/2014,07/06/2014,06/06/2014,......30/05/2014...
from jqm-calendar.
Above answers do still hold, if you want further support please supply a JSFiddle.
from jqm-calendar.
please visit this site
http://www.nogray.com/example.php?ID=286
this type of calendar need.
please replay me as soon as possible
from jqm-calendar.
please visit this site
http://www.nogray.com/example.php?ID=286
and
http://jsfiddle.net/SirDerpington/PPSh3/3/
how to apply jQM Calendar?
please replay as soon as possible
from jqm-calendar.
The examples are using jQuery UI, why not use that. Please ask further questions at stack overflow, I'm going to lock this issue now.
from jqm-calendar.
Related Issues (20)
- Issues with jQuery Mobile 1.4.2
- refresh not working HOT 1
- Enable dynamic loading of events
- Taphold HOT 2
- Change in calendar options does not get triggered after refresh HOT 11
- Ignore button when searching for events HOT 2
- Buttons to change year HOT 2
- Disable past dates HOT 8
- eventhandler must contain all events in order to work HOT 5
- Question: What would be involved in upgrading jqm-calendar to JQM 1.4.5? HOT 3
- Wrong next month HOT 20
- Last version does not work (at least on Chrome desktop and mobile) HOT 8
- new Date(2015,09,05,10,30) format shows up 1 month later HOT 1
- Update issue HOT 10
- demo HOT 1
- full year view HOT 3
- Calendar not working in Compiled APP. HOT 1
- Problems to see the correct Date HOT 1
- Display evends in the calendar HOT 2
- Dates HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jqm-calendar.