so my problem is this. I use the multi datepicker, http://multidatespickr.sourceforge.net/
for a site with news block. i save multiple dates for 1 news item and it works like a charm with php. BUT now my problem is, if someone wants to edit the news , I do get the current dates the news has, in a input field, but that isn't marked on the multi datepicker. problem here is, if they selected 30 dates, and want to exclude one after editing, they have to pick 29 dates again on datepicker, cause they wouldn't be active otherwise. my question here is, is there any way to make the datepicker get the dates from an input field ? FYI I get the same date formats both on getting and selecting from datepicker.
You'll have to show the context in which you use it, but the addDates parameter looks like it does what you want, so on instantiation you would pick up the list of dates from your input field and supply them in this parameter. See also how to pre-select dates.
I'm surprised the datepicker isn't permanently alive and just shows itself, in which case it would know what state it was in from last time it was hidden.
Update: reading even further it seems it uses the dates from an input field anyway. See this demo further in the instructions
Related
I want to create repeating Events like gmail. IF any idea, Please let me know? Thanks in advance.
You can setup/install the Date module on your site. Then, in the Event content type, configure your event date field with the repeat option enabled (see screenshot in Lullabot's blog post about the date module)
Also, here are a few considerations about dates during your Event content type and views setup process:
Once you configure the date field and add event content with those fields defined, you won't be able to modify the field settings to a more restrictive state. (For example, if you enable repeat and then decide to disable repeat). A work around for this is to create a new date field with desired settings, use views bulk operations to copy the data from obsolete date field to new date field, then delete obsolete date field.)
When working with repeating or ongoing events, you'll need to determine how you want them to appear in chronological event listing views. (For example, ongoing events may wind up showing at top of list if your sort is based only on start date. If your view is limited to very few listings/results, and all your events repeat- make sure there's enough variety of events to avoid showing the same repeating event back to back in the view. You may want to consider showing only distinct results in the view.)
When working with repeating dates, do the times also repeat? If not, you may want to also install the Node Clone module and configure so content managers can copy event nodes and edit/modify times.
If showing times, do you need to show timezones associated with them?
i am new to html and php i have created one railway ticket booking page in html .in that form page there are option where the user going to fill like start station,reach station and date, so how can i show date ,that is when the user click the date means it shows like a calender and the user select the appropriate date where planned to travel and i want to show next three month date from the current date like a calender. because we give permission to book the ticket before three month..so any one help me doing this in html..
and when the user select the date how can I get that selected date..
This can't be done in HTML alone, you need to use javascript, or even better, jQuery, which is a javascript library designed to simplify the creation of client-side scripts.
When using jQuery, as you can probably suspect, a lot of things already exist, including a date picker.
You can find more info on this page : http://jqueryui.com/datepicker/
I also encourage you to check out the other contents the jQuery UI site, as they are really useful to easily design richer forms.
I am using Jquery Datepicker. In on of my module (PHP) when i am trying to add package details i need to show the date picker with already selected dates in other color. So that admin will not use those selected dates for new package.
Please help me. Thanks in advance.
Regards,
Prabu
I'm not clear on whether you're trying to limit the selection to a specific date range, or whether you want to disable arbitrary dates within a range.
If it's the former, you should be able to specify minDate and maxDate when initialising datepicker. See here.
If the latter, you should be able to use the beforeShowDay option. There's a nice explanation on this question. The second element of the return value is a class name - using that with some corresponding CSS will allow you to see the colour. You can stop it being selected at all by returning false as the first element of the return value.
i am using jquery date and time picker in one my project where users can create an event. in the jquery datepicker, i have the option to select the today's date and future date and not the past date which is good for an event creattion website. but i am stuck with the time picker. for example, if i am in the event creation page(assume now time is 9.30am) and select date as 2010-08-05, then i click on the time field but the time field shows time that is already past i.e. time before 9.30, i cannot allow user to choose time that is before the current time. how can i valdiate this? or is there any way not to show the past time?
I am using php, if i decide to validate using php, how i am supposed to validate, which time I should use as base to check the user selected time? users can come from any country so how i am supposed to know which is past time for an user.
I use this http://labs.perifer.se/timedatepicker/, I use the first option and I can use the last option where users allowed to enter two fields which is good as we can know the duration and good thing is second field works based on the i/p in the first field but still this doesnt solve my past time issue.
please let me know if i am not clear.
regards
>> users can come from any country so how i am supposed to know which is past time for an user.
If I understand you well, the best way is to check at the client side(in javascript).
Here is the sample code .
$("#time").timePicker({
startTime:new Date() // pass the current time
});
Then, the timePicker will omit the past and start from the current time.
I am trying to find a date picker that can show dates to select starting current date so that the users don't select the past date and I need not worry about validating. I am not sure if this will show the correct date for any one from any place. I found some plugins but none of it has this option.
I found this http://jqueryui.com/demos/datepicker/#min-max but the restrict range option starts with 10-15 days before current date. I am expecting the date format to be 2010-06-28 as I have my other code on the site works based on this format.
I am trying to find a best example for php/mysql/jquery crud with these options
After a user logs in, I want to show his/her current list of items with "delete item, update/modify item, add a new item. I have a page for the "add new item" so the user can be navigated to that page and he can add a new item by filling a name, date and some more info.
Please help me out. Sorry if I cannot post questions asking for info without giving any code examples.
regards
The jQueryUI datepicker that you mentioned will do what you need it to. Set the options for the instance using the options below:
$(document).ready(function() {
$("#datepicker").datepicker({
minDate: +0,
dateFormat: 'yy-mm-dd'
});
});
This will start the date options with today and format the date as you specified the format needed to be. All you need to do is make sure the selector is correct by setting the correct ID for the input field.