close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Date picker capabilities

Thread began 3/31/2011 8:43 am by mrs | Last modified 12/05/2011 3:34 am by Massimo | 3540 views | 9 replies |

mrs

Date picker capabilities

Is the date picker part of this extension able to give me daily and hourly appointment slots?

I need to create an hourly appointment registration and I am hoping this can do it, but if not, is there something in webassist that can do it?

Thanks.

Mat

Sign in to reply to this post

Jason ByrnesWebAssist

the data picker can only do calendar days, not times.


you would need to create a select list for the appointment times.

use the date picker to select the day, and the select list for the time.

Sign in to reply to this post

superpac250441

Is there a way to modify the datepicker so that it also adds time once you select a date. How would you modify the code to do that?

Sign in to reply to this post

CraigRBeta Tester

the datepicker extension is based on the jquery Datepicker

datepicker/

Ther is no time option for this extension

It is fairly straightforward to add a text or select list to your form in order to store the time as well.

If you don't mind doing some coding, take a look at

anytime/

if you want an integrated extension.

Personally, i never bothered, as a select list in addition to the date picker is sufficient for my needs

Sign in to reply to this post

superpac250441

Thanks for that Craig. I will take a look.
What I am trying to do is do a date time stamp equivalent where I have 2 seperate registrations. The user registration has hidden field ala <?php echo(date("Y-m-d h:m:s")); ?> but I am wanting the admin to change the date by using an altered datepicker to be able to adjust the date and have h:m:s at the time the admin used the date picker so that the format of date time is the same

Sign in to reply to this post

superpac250441

Thanks Craig. That resource is quite something. It would be fantastic if this kind of thing could be implemented within the WA Datepicker

Sign in to reply to this post

superpac250441

The addition of a set time

In the date picker code of my user-insert, I have:

<script type="text/javascript">
$(function(){
$('#datepicker_1').datepicker({
dateFormat: 'yy-mm-dd',
showAnim: 'show',
onClose: closeDatePicker_datepicker_1
});
});
</script>

I want to add a set time of 12:00:00 to the date so that I achieve a date time to the database.

Can this do it?

<script type="text/javascript">
$(function(){
$('#datepicker_1').datepicker({
dateFormat: 'yy-mm-dd 12:00:00',
showAnim: 'show',
onClose: closeDatePicker_datepicker_1
});
});
</script>

If not, is there a way to do it?

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

No, the datepicker wont except a time format.


you can change the date on post though, to include the time.

for example, if the name of the date picker element is "datePicker" add the following code at line 1:


php:
<?php if(isset($_POST['datePicker'])) $_POST['datePicker'] = $_POST['datePicker']." 12:00:00"?>
Sign in to reply to this post

superpac250441

Jason - Fantastic!! Many thanks!

Sign in to reply to this post

Massimo

following Jason indication I have make this:
I added two select field in form one for hour and on for minutes, and the changed the post:
<?php if(isset($_POST['datePicker'])) $_POST['datePicker'] = $_POST['datePicker']." 12:00:00"; ?>

to

<? php if (isset($_POST["datePicker"]))? $_POST["datePicker"] . " " . $_POST['hour'] . ":" . $_POST['minutes'] . ":" . "00" ; ?>

and work fine.
My real db insert is:

|" . "".((isset($_POST["datePicker"]))?(my_change_date_format_function($_POST["datePicker"])) . " " . $_POST['ora'] . ":" . $_POST['minuti'] . ":" . "00" :"") ."" . "|

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...