Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    JavaScript


Advertisements:










Jquery :: Dynamically Change Highlighted Dates In Datepicker


I have a Jquery Datepicker object that is created fine with no highlighted dates and a particular minDate. I want to add a highlights to this datepicker based on an AJAX call made by the user, but the only way I can see to change the highlights is adding a function to the beforeShowDay event, which is set on setup. How can I change this function on an existing datepicker and force it to redraw so that I get my new date(s) to be highlighted.


View 2 Replies (Posted: Feb 8 at 14:49)

Sponsored Links:

Related Forum Messages For JavaScript category:
Ajax :: Disable Dates Dynamically In Jquery Datepicker
In my current project, when the user select a hotel, and when he select the arrival date, and departure date, I have to show the hotel unavailable dates as disabled in jquery datepicker This is my javascript code

$("#select_villa").change(function(){
$('#textfield1').datepicker( "destroy" );
var dataString = 'villa=' + $("#select_villa").val();
$.ajax({
type: "GET",
url: "include/getdate.php",
[Code]...

Posted: Mar 8 at 5:31

View 3 Replies!   View Related
JQuery :: DatePicker Change Value Of Input Based On Difference Between Two Dates
I have 3 input fields
<input type="text" name="cust1" id="cust1" size="10" value="" class="inputbox" />
<input type="text" name="cust2" id="cust2" size="10" value="" class="inputbox" />
<input type="text" name="rent_price" id="rent_price" size="10" value="" disabled="disabled" class="inputbox" />

jQuery Datepicker
$( "input#cust1" ).datepicker();
$( "input#cust2" ).datepicker();

And function to change value of input#rent_price:
function setSum(){
var hrs = countHrs();
$("input#rent_price").attr('value',function(){
sum = parseInt(BAG_PRICE)*parseInt(hrs);
if (isNaN(sum)){
sum = '';
return sum;
} else {
return sum;
}});}

So when I'm writing this:
$( "input#cust1" ).change(setSum());
$( "input#cust2" ).change(setSum());
Value of input#rent_price changing only afted refreshing page. If I write alert in setSum() it triggers 2 times.

Posted: Sep 4 11 at 10:22

View 1 Replies!   View Related
JQuery :: Html - Change The Font Color Of Weekend Dates In Datepicker?
Is it possible to change the font color of dates that fall on the weekends in jquery calendar? I try to use the class ui-datepicker-week-end but it only change the font color of Sun and Sat. What I want is to also change the color of days that falls on sun and sat.

Posted: Dec 14 10 at 13:48

View 1 Replies!   View Related
JQuery :: Highlighting Dates Between Two Selected Dates UI Datepicker?
I have one datepicker with numberOfMonths set to 2. Arrival Date and Departure Date are determined using this logic (within onSelect):

if ((count % 2)==0) {
depart = $("#datepicker-1").datepicker('getDate');
if (arriv > depart) { temp=arriv; arriv=depart; depart=temp; }
$("#check-in").val($.datepicker.formatDate("DD, MM d, yy",arriv));

[Code]....

how I can make this highlight dates between the Arrival and Departure using my aforementioned logic used in determining the two?

Posted: Apr 16 10 at 9:13

View 1 Replies!   View Related
Get Datepicker To Be Highlighted Upon Refresh?
I have a datepicker that highlights a selected week. It is using an ajax request. Which is where I am having a problem. When I select a week i.e. 29/08/11 and the page refreshes the highlighted week is no longer highlighted.

Datepicker.js

$(function()
{
var startDate;

[Code].....

Posted: Sep 1 11 at 11:21

View 1 Replies!   View Related
JQuery :: Change Option Dynamically In UI DatePicker Fails
I want to make date range selection using jquery-ui datepicker. First change at #dteStart succeed to set minDate at #dteEnd. But #dteEnd failed to refresh its options on next change, if I alert
DateOptions.minDate its value changed according to dateMin.

$(document).ready(function () {
$("#dteStart").datepicker()
.change(function () {
dateStart = $(this).datepicker('getDate');
dateMin = new Date(dateStart.getTime());
dateMin.setDate(dateMin.getDate() + 1);

var DateOptions = {
dateformat: "mm/dd/yyyy",
minDate: dateMin
}
$("#dteEnd").datepicker(DateOptions);
});
});

Posted: Dec 7 10 at 3:16

View 1 Replies!   View Related
JQuery :: Allowing Only Certain Dates Using The Datepicker?
I an using the datepicker, [URL] . Does anybody know if there is a way for me to configure this so it will only show Mondays ? Basically I want a user to select a date, but the date must be a monday.

Posted: 06-Dec-2009

View 4 Replies!   View Related
JQuery :: Formatting Dates With Datepicker?
I'm trying to format the dates from datapicker to be only displayed in the certain weekday period. For example, I would like to choose only Tuesdays in 3-month period (3-month period can be done by setting minDate and maxDate variables in jquery). But how to highlight in this period only Tuesdays (other days should be inactive)? Is it possible?

Posted: 09-Dec-2009

View 2 Replies!   View Related
JQuery :: Datepicker Disable Dates On IE
i have a big problem with my jQuery Datepicker Script. I use jQuery 1.4.2 and jQuery Ui 1.8. Background: I have a reservation calendar with a fromDate and toDate and all Dates which are already reserved are disabled. The Dates come from Database by AJAX Call. Problem: Everything works fine in Firefox - but IE 7/8 does not disable Dates execept for the actual month. I do not get any Error Message in IE 7/8!

[Code]....

Posted: Jul 27 10 at 12:24

View 1 Replies!   View Related
JQuery :: Parsing Dates From UI Datepicker?
I am using jQuery UI datepicker to allow the user to select dates.

This updates an input field in a form in the format:

dd/mm/yyyy

I am trying to use jQueryUI to then parse the date in a UNIX timestamp to check it is a date with the built in jQuery UI parseDate:

[URL]

However i am not sure how to output a date in timestamp format from a string e.g. 13/05/1978?

I tried this:

$.datepicker.parseDate('@', '13/05/1978');

But it does not seem to work or i am reading the documentation wrong.

If i use Date.parse('13/05/1978') it returns the timestamp 284342400000 which i assume to be correct.

Basically i am trying to get a Date object from a string which is inserted to an input field by the jQuery UI datepicker.

Posted: Sep 8 10 at 11:38

View 1 Replies!   View Related
Jquery :: Datepicker Dynamic Min - Max Dates
I'm using the jQuery datepicker plugin on a site I am building. I need users to be able to pick two dates from within a specified range of dates. This is straightforward enough to do.

The problem is that the allowable range of dates changes depending on another select box (with building names in). So what I need to happen is to look up the building in a mysql database, return the min and max date allowed and use the datepicker to allow users to choose a date range within the allowable range.

On my main page, I am currently using:

To load a php file which outputs:

Where the minDate and maxDate have been populated correctly from the mysql database. However, the result is that I just get a text box with the date in it on my main page instead of the datepicker element.

Posted: Mar 4 11 at 16:36

View 2 Replies!   View Related
JQuery :: Highlight Dates In UI Datepicker?
How i can use beforeShowDay for highlighting days in jQuery UI datepicker. I have the following date array

Array
(
[0] => 2011-07-07
[1] => 2011-07-08

[code]...

Posted: Jul 28 at 9:48

View 3 Replies!   View Related
Jquery :: Disable Dates In Datepicker
I found this code to disable dates in jquery datepicker

$(function() {
$( "#pickdate" ).datepicker({
dateFormat: 'dd MM yy',
beforeShowDay: checkAvailability
});
})

for the datepicker stuff, and then:

[Code]....

This code works except only the last entry of the database table is disabled in the datepicker. I guess $myBadDates = new Array(json[i].start); isn't the right code of creating an array from json? How do I create an javascript array from json?

Posted: 28 Days Ago

View 9 Replies!   View Related
JQuery :: DatePicker - Only Select Certain Dates?
I'm using JQuery and the DatePicker (or trying to) and have hit a brick wall.

I can't seem to figure out how to provide a list of acceptable dates. I know there is a way to provide a date range but I want to provide a list of dates that can be selected.

I.e. there may be only Thursdays and Fridays, so this month the acceptable dates would be:

8/6/2009
8/7/2009
8/13/2009
8/14/2009
8/20/2009
8/21/2009
8/27/2009
8/28/2009

I'd like ONLY those dates to be able to be selected. Is this possible? If so, how would I configure the datepicker?

Posted: Aug 12, 2009

View 2 Replies!   View Related
JQuery :: Show Selective Dates In DatePicker?
I am a beginner in JQuery DatePicker usage. I need to show a datepicker control in my JSP page in which some of the selective dates will be available for selection. How can I enable these selective dates in my JQuery datepicker control.

Posted: 20-Nov-2010

View 1 Replies!   View Related
JQuery :: UI Datepicker Preselct Multiple Dates?
Does anyone know if it's possible to preselect/highlight multiple dates within the jquery datepicker? I would like to pass an array of dates to the datepicker to highlight them.

Posted: 15-May-2009

View 1 Replies!   View Related
JQuery :: Pick From Two Ranges Of Dates With Datepicker?
I am using the jQuery Datepicker [URL]. I am trying to let the user pick a date from two separate ranges of days. I can't find that feature in the documentation and I would like to know how to make that possible.

I want to let the user pick from 1-5 days after the current date. I also don't want to allow the user to pick days on the weekend. I figured out how to do that using the following settings:

$("#rush_needed_by_english").datepick({
minDate: +1,
maxDate: +5,
beforeShowDay: $.datepick.noWeekends
});

As it is now, if the current day is a Thursday for example, it will only allow the user to pick Friday,Monday, and Tuesday since it is set up to only allow 1-5 days after the current day to be selectable, but Saturday and Sunday are not selectable.

As far as my example is concerned, what I would like is to either skip the weekend days completely and make Friday and Monday-Thursday selectable. Or if that is not possible, I would like to set the two different ranges of days to pick from. So per my example, I would use javaScript to find the current day(Thursday), and then make two selectable ranges of dates(Friday AND Monday-Thursday).

How can I skip the weekend days so 5 days are selectable while skipping over the weekend days?

Posted: Mar 8 10 at 8:41

View 1 Replies!   View Related
JQuery :: Pick Multiple Dates One By One With Datepicker?
I have a form and on that form I would like to have a datepicker. So when someone clicks select dates field the datepicker pops up and shows multiple months. From there I would like for the person to click individual dates, each click the date they selected gets appended to the form field comma seperated.

[URL]

The problem is when I select a date the datepicker closes then the date selected shows up in the form field. I want the datepicker to continue to show while they select multiple dates and the dates they selected stay highlighted, then click done when they are done selecting dates. how I can accomplish this or is there a pre-existing jquery code that does that?

Posted: Jun 30 11 at 18:55

View 1 Replies!   View Related
JQuery :: DatePicker Constrain To Only Valid Dates?
I am currently using the JQuery datepicker, however it doesn't appear to enforce the input of only valid dates. Is this possible? For example, it will allow me to manually enter 22/22/22 into the date field. As a last result is it possible to only allow users to enter a date via the picker popup?

Posted: Aug 5 11 at 10:25

View 2 Replies!   View Related
JQuery :: Disable Dates Before Today In Datepicker
How do I disable dates before today in jQuery datepicker WITHOUT using minDate: 0? I would like to enable navigation of the calendar as per usual before today while making sure that user do NOT pick dates before today. (i.e. say today's date is 11Aug11 and I would like all the dates before this disabled but still enabling user to go to previous months, years, etc.)

Posted: Aug 10 at 15:40

View 2 Replies!   View Related
JQuery :: Get Datepicker To Format Dates Before Displaying Them?
Basically, I have a jquery datepicker linked up to an input field which paths to a java Date object. Everything works just fine, but the datepicker initially displays a String like this:

Thu Sep 01 00:00:00 MDT 2011

As soon as I pick a date it formats it to the default, is there a way to make it format before the initial display?

Posted: Sep 21 at 15:40

View 1 Replies!   View Related
Jquery :: JqueryUI Datepicker And Allowing Non-dates?
How would I use the jqueryUI "datepicker" if I want my input field to allow non-dates (or invalid dates)?I have a server-side script which can handle a normal date as input, or an asterisk to mean "latest date available" (amongst a few other special codes).It would be nice to have a popup datepicker in my HTML form, but only when needed.How can I use the jqueryUI datepicker to choose a specific date (for example, by clicking on a datepicker icon), while also allowing the user to enter one of our special codes as a "fake date"?

Posted: Oct 3 11 at 13:50

View 2 Replies!   View Related
JQuery :: Hyperlink The Selected Dates In Datepicker UI?
I want to hyperlink the selected dates (with events names) to appropriate event (separate page or anchor). Here is the script I'm using to specify my events:

$(function() {
// format: specialDays.year.month.day
var specialDays = {
'2011': {

[Code].....

Here is the the jsFiddle with this calendar.

The main goal is to create custom Tooltips for the selected dates (Featured Events) and make these dates clickable.

Posted: Oct 27 11 at 19:04

View 2 Replies!   View Related
JQuery :: UI Datepicker - Disabling Specific Dates?
I am using the jQuery UI Datepicker - Event Search.

I want to disable specific dates only. For example, I want to disable the following dates only:

Code:
10th Oct 2010
21st Oct 2010
12th Nov 2010

searched in google and found one page which promised to deliver what I was looking for. But unfortunately it does not seem to work. If you look into its demo, it has disabled ALL dates.

Posted: Oct 13, 2010

View 7 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved