I added it to my app and it seems to work, although I am working through some other issues. Did you try to add the script and then implement it in your app. The only "weirdness" I noticed is that I had to click outside the text field and then into it (presumably triggering a focus event) in order for the calendar to display
for a discussion of how to make the JQ UI datepicker work (kinda, mostly) in JQM and why there is a deeper issue of overlapping style names between JQUI and jQM which makes integration currently painful.
Thanks jtsage. I was looking for a date picker that would work in a mobile environment, any date picker. Trouble is I'm just getting my jQuery legs and fixing minor glitches is a big undertaking for me. Your example is the only one that worked flawlessly, out-of-the-box on both the iPhone, iPad & Windows PC environments.
Works great in iPhone. (With Android i initially get 1970 as year?) I was wondering if I could use it as an event calendar. For example: 2 instances -> start date - end date (start date plus 7days). Any idea?
Ok, first things first - not sure why android would default to 1970 (well, that's not true, the date makes a lot of sense, what I'm not sure about is why it's not getting reset to "today" - I will investigate)
As for date ranges, I'm not sure I exactly follow what you are trying to do, but, fwiw, DateBox does fire a 'change' event when the user chooses a date - that could be used to auto-fill a second input form. I threw this little demo together to show how that might work - the page source is heavily commented so you shouldn't have any trouble following what I did.
I see from your example that you have already managed to get both start/finish date fields to be always one minor than the other. Could you please share your code and a little explaniation on it? I am actually trying to get the same behaviour with no luck.
I really like jtsage's calendar, but found out, that a calendar in a new window would be much better for my setup. So I took Tigra Calendar (http://www.softcomplex.com/products/tigra_calendar/) added some things and updatet it with some css to work for mobiles.
On clicking/touching the date field, the calendar opens with today's date as the default instead of "01/01/2011". If I remove the dateFormat override or change it to "dateFormat": "MM-DD-YYYY", it opens to the correct date. I tried to figure out the script code and have concluded that the '/' is causing some sort of error that causes the code to revert to a default of the current date. Could be wrong and I did not have much luck trying to fix the problem.
Hmm - I can't seem to duplicate this problem... http://dev.jtsage.com/jQM-DateBox/format.php fwiw, your value default isn't of the same format, but that shouldn't matter - there indeed is a fallback support for that. Um, what browser / device are you seeing this on? Additionally, what locale is set on that device (language choice / default date format for the computer or device)
sorry, for some reason I couldn't comment directly on your post. *shrug*
But, I threw together a quick demo of how something like that would be possible, just a little css, and forcing a few of the events really. I'm not sure how you could use the non-dialog mode, as hiding the form element throws off the math that centers the popup.
In this case, the openbutton of datebox will be located below the input box. I tried it on Android 2.2 emulator. It can be reproduce on Google Chrome browser as well by reducing browser screen size of browser to the similar size of Android device screen.
This response is actually for jtsage, though for some reason I couldn't reply directly to any of his (your) posts.
Your datepicker is really great -- thanks so much! I just have one question: is there a maximum number of days for the minDays setting? If I set it to more than a low 100-something, the calendar will open up, but it's "stuck" in the current month and the user can't click on anything.
Yeah, minDays and maxDays actually don't take into account the year - only the month and day, so I expect when it overflows a year boundary, this gets a little iffy. I am planning on fixing this, either this weekend, or early next week - sorry bout that :)
Jt - think your datepicker is great except for one very important thing: If a date is over-top of another field, say, a select list, selecting the date will, instead, select the underlying select list. Since this presents a very big problem, and I don't hear a lot of others complaining about it, perhaps it is something I am doing wrong?
Leave a comment on gonzofar's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic