Timesheet entry form that auto-fills the Date ranges?

I currently have a ColdFusion form & need to add a "Week Selector" drop-down above my table so that:
- when the week is chosen from the drop-down, (how do I generate these weeks drop-down values?)
- the correct dates are added to the date fields in the form.. (how do I populate the text boxes?)
- Once the user chooses the week, the Sun-Sat dates update, he then enters his time for each day..
--Choose Week-->Nov 3 thru Nov 9<-- (drop-down)
Sun---Mon---Tue---Wed---Thu---Fri---Sat (static labels)
11/03 11/04 11/05 11/06 11/07 11/08 11/09 (text boxes for dynamic dates)
0 8 8 8 8 8 (text boxes for hours entry)
Here is a sample picture of what I'm trying to roughly duplicate:
Note: This UDF post by Ben Nadel looks promising: http://www.bennadel.com/blog/719-Ask-Ben-Getting-The-Date-Based-On-The-Year-And-Week-In-Co ldFusion.htm

Ok, here is my current page so far:
- Using this jq weekly calendar: http://jsfiddle.net/manishma/AVZJh/light/ I'm able to select the week and have it update my "Start thru End" dates text boxes.
- But how do I update the javascript (code below) to also "populate" the weekday column headings (highlighted in yellow) with the mm/dd?
- Lastly, I'm not sure how to do the SQL INSERT across three rows of data (highlighted in yellow)?
Here is my updated code to fill in the labels with the dates:
<script type="text/javascript">
$(function() {
var startDate;
var endDate;
var monDate;
var tueDate;
var wedDate;
var thuDate;
var friDate;
var satDate;
var sunDate;
var selectCurrentWeek = function() {
    window.setTimeout(function () {
        $('.week-picker').find('.ui-datepicker-current-day a').addClass('ui-state-active')
    }, 1);
$('.week-picker').datepicker( {
    showOtherMonths: true,
    selectOtherMonths: true,
    dateFormat: "mm/dd",
    firstDay: 1, // Start with Monday
    onSelect: function(dateText, inst) {
        var date = $(this).datepicker('getDate');
        startDate = new Date(date.getFullYear(), date.getMonth(), date.getDate() - date.getDay() + 1);
        endDate = new Date(date.getFullYear(), date.getMonth(), date.getDate() - date.getDay() + 7);
        monDate = new Date(date.getFullYear(), date.getMonth(), date.getDate() - date.getDay() + 1);
        tueDate = new Date(date.getFullYear(), date.getMonth(), date.getDate() - date.getDay() + 2);
        wedDate = new Date(date.getFullYear(), date.getMonth(), date.getDate() - date.getDay() + 3);
        thuDate = new Date(date.getFullYear(), date.getMonth(), date.getDate() - date.getDay() + 4);
        friDate = new Date(date.getFullYear(), date.getMonth(), date.getDate() - date.getDay() + 5);
        satDate = new Date(date.getFullYear(), date.getMonth(), date.getDate() - date.getDay() + 6);
        sunDate = new Date(date.getFullYear(), date.getMonth(), date.getDate() - date.getDay() + 7);
        var dateFormat = inst.settings.dateFormat || $.datepicker._defaults.dateFormat;
        $('#startDate').val($.datepicker.formatDate( dateFormat, startDate, inst.settings ));
        $('#endDate').val($.datepicker.formatDate( dateFormat, endDate, inst.settings ));
        $('#monDate').val($.datepicker.formatDate( dateFormat, monDate, inst.settings ));
        $('#tueDate').val($.datepicker.formatDate( dateFormat, tueDate, inst.settings ));
        $('#wedDate').val($.datepicker.formatDate( dateFormat, wedDate, inst.settings ));
        $('#thuDate').val($.datepicker.formatDate( dateFormat, thuDate, inst.settings ));
        $('#friDate').val($.datepicker.formatDate( dateFormat, friDate, inst.settings ));
        $('#satDate').val($.datepicker.formatDate( dateFormat, satDate, inst.settings ));
        $('#sunDate').val($.datepicker.formatDate( dateFormat, sunDate, inst.settings ));
        selectCurrentWeek();
    beforeShowDay: function(date) {
        var cssClass = '';
        if(date >= startDate && date <= endDate)
            cssClass = 'ui-datepicker-current-day';
        return [true, cssClass];
    onChangeMonthYear: function(year, month, inst) {
        selectCurrentWeek();
$('.week-picker .ui-datepicker-calendar tr').live('mousemove', function() { $(this).find('td a').addClass('ui-state-hover'); });
$('.week-picker .ui-datepicker-calendar tr').live('mouseleave', function() { $(this).find('td a').removeClass('ui-state-hover'); });
</script>
And then in my HTML page I used:
<thead>
<tr>
  <th>Type</th>
  <th>Mon<br>
    <input disabled id="monDate" size="5" data-mini="true"></th>
  <th>Tue<br>
    <input disabled id="tueDate" size="5" data-mini="true"></th>
  <th>Wed<br>
    <input disabled id="wedDate" size="5" data-mini="true"></th>
  <th>Thu<br>
    <input disabled id="thuDate" size="5" data-mini="true"></th>
  <th>Fri<br>
    <input disabled id="friDate" size="5" data-mini="true"></th>
  <th>Sat<br>
    <input disabled id="satDate" size="5" data-mini="true"></th>
  <th>Sun<br>
    <input disabled id="sunDate" size="5" data-mini="true"></th>
  <th>Totals</th>
  <th>Description</th>
</tr>
Message was edited by: jlig

Similar Messages

  • How do i keep only the name of a month in a cell in Numbers and not have it auto fill the date and time?

    how do i keep only the name of a month in a cell in Numbers and not have it auto fill the date and time?

    Hi JN and Barry,
    Barry wrote:
    The second case may not be included in the available D&T formats in Numbers 3
    For my region, the Date & Time data formats include month.
    The Date Pop-Up
    This may not be the case for all regions.
    Remember that the month is only the display, and the Full Date & Time is still there. If I change the format to reveal what is behind the curtain:
    Regards,
    Ian.

  • How to: Create a master form that auto-fills data into other pdf forms?

    I hope someone can please help me.  I have about 15 PDF forms that all require similar data entry (name, address etc). Can I create a master form that we fill in once per client, and then auto-fill in the matching data on the 15 forms? 
    I am not looking for an online solution as the information is highly sensitive. 
    I have already created a form in Acrobat X Pro with the 'master data', and created the (15) forms with identically named fields.  How I link the forms now to the master, I cannot figure out (after much searching).
    I have read similar questions on the same topic but have not found any answers.   I hope this time someone can please help.
    Many thanks in advance.

    Thank you!  I had just figured out how to export the data from the master as an FDF file and then import it to the other files.  I'm afraid I don't understand scripting to automate the process across multiple files.  To you mean with java script? 
    I've also thought about combining the forms, once we know which ones the particular client will need.  I have to see how it works in practice for my colleagues who will be using them.
    Thank you again.

  • How to create a calendar picker that auto populates the date in adobe XI Professional?

    I'm looking to do this in a  form i'm creating.

    There is no built-in date picker (for Acrobat/Reader on Windows/Mac at least) for forms created with Acrobat. I'm hoping that will change someday, but in the mean time you can use the date picker provided by: http://www.formrouter.com/tools/
    There is also a PDF developer (not me) who sells a JavaScript-based date picker using custom dialogs, which is much more convenient. You can PM me if you want contact information.

  • Calling report with auto-filling the date parameter

    Hi all,
    I need to schedule a report whereby the date is need to be entered manually by the user.
    Now, if I need to schedule this report, how am I tell this report on the date parameter I want to fix in the 1st day of a month. So that the report will be generated based on the schedule time say every 1st day of the month and in the report date parameter as well it will automatically filled up the date. How to do that in details ?
    Any advise will be appreciated.
    Rgds
    Lim

    Hi!
    For a scheduled task I would just called your report in a way similar to this:
    rwrun60.exe ... paramform=no p_date=sysdate
    where p_date is a date parameter created in the report. Take a look at the online help article "RWRUN60 Command Line Arguments" for more information.
    Regards,
    Andrew Velitchko
    BrainBench MVP for Developer/2000
    http://www.brainbench.com

  • How to use SQL to display Datethat falls between the date range

    Hi,
    I'm figuring out how do i use SQL to select data
    that falls between the date range stated
    (for eg. 19/02/1955 to 19/02/2003)
    I've tried :
    sql="Select * From StudentRecords WHERE DOB BETWEEN #" jTextField21.getText() "#" +" And " +"#" +jTextField22.getText;
    Using BETWEEN statment , but Between Statement isn't doing what i want..
    even those out of range are displayed... any ideas how??
    Thank yOU in advance!

    oracle:
    sql = "Select * From StudentRecords WHERE DOB between TO_DATE('07/04/2003','dd/mm/yyyy') and TO_DATE('08/04/2003','dd/mm/yyyy')";

  • How do I auto populate the date into text fields when form is first opened?

    Hello,
    I read all about the changing the scripts but its not really working for me. I was hoping someone could help me with directions on how to auto populate the date into designated text fields when my adobe document is first opened?
    I am working in Adobe Acrobat 9.
    Thank you,
    Sheri

    When you add a new document JavaScript (Advanced > Document Processing > Document JavaScripts > Script Name (enter something) > Add), you will be given a function skeleton by default. Just delete it and enter the line of code I showed above. Now, whenever the document is opened, the code will get triggered and the field will be updated with the current date. There is no "Document Open" action (at least that's accessible via Acrobat's UI), but this is effectively the same thing since any document-level JavaScripts are executed when the document is opened.

  • OTL I am trying to wright a SQL query that will return the date the timesheet was submitted and date/time it was approved, can anyone guide me on this?

    Hi
    I am trying to wright a SQL query that will return the date the timesheet was submitted and date/time it was approved, can anyone guide me on this?
    I basically need person name who submitted, date - time it was submitted for approval, then the person who approved it and the date - time that it was approved
    Thanks
    Ruby

    Ruby,
    you can start with HXC_TIMECARD_SUMMARY table for submitter detail. But for approver details, i think you need WF tables to get the data for item type HXCEMP.

  • Auto-fill/password data deleted following Safari crash

    So, I've been having a seriously large amount of problems with Safari crashing over the past few months. Usually it just shows the spinning wheel of death, sometimes it just automatically reloads every page/tab I have open (if anyone can suggest a fix for that it would be great).
    However, this time it crashed and it appears to have completely wiped out all of my auto-fill/password data that I had saved. As this is a personal computer and nobody else uses it, I had a lot of passwords saved into it (most of them for low security risk sites). As everybody knows, a user often has hundreds of usernames/paswords for a huge number of websites. I can't remember them!
    I'm concluding that as they've all been deleted, I'm going to have to go through the arduous process of clicking the 'forgotten username/password' to retrieve these details; however, now whenever I try to save back in the auto-fill, it's not really working too well and just isn't saving it, despite me choosing for auto-fill to be operational on the website.
    Any help would be massively appreciated to sort this, as having to keep entering my usernames/passwords - urgh, let's just say this is the biggest first world problem since before bread was sliced!!
    Safari version 5.1.10
    Mac OS X Version 10.6.8

    Passwords are stored in Keychain Access located in Applications > Utlities
    Launch Keychain Access then select Passwords on the left.
    Type in the name of a website you've visited that autofilled the password.
    Then double click the website name the select the Attributes tab then click: Show password
    You may be prompted for your admin password to proceed.
    If you want a website to re remember the password, right or control click the website name in Keychain Access the click Delete.
    The next time you login to that site and enter your password you should be prompted to save that data to a new keychain.
    message edited by:  CS

  • Exception Message: The form cannot connect to the data source. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

    When opening a form in SharePoint 12013 that was created from Infopath 2013, I get the following error.
    You do not have permissions to access a database that contains data required for this form to function correctly.
    An entry has been added to the Windows event log of the server.
    Log ID:5566
    When I go to the log files on the SharePoint server. I see the following error.
    Exception Message: The form cannot connect to the data source. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'
    I am guessing this has something to do with the UDCX connection and the database.
    Can anyone help me get this fixed?

    Hi Jim,
    Please check the following kb article when it occurs 5566errro with the UDCX conection file, try the method of using the Secure Store Service to store alternate credentials for the data connection method, or the method of stating the credentials
    in the UDC file explicitly.
    Also check if it could help with setting sql server as "SQL Server and Windows Authentication mode".
    http://support.microsoft.com/kb/981684
    Thanks
    Daniel Yang
    TechNet Community Support

  • Form is auto filling fields

    I have come across pdf applications online that let you fill them out right there and submit them which is awesome but I have come across a few that auto fill all of the boxes in the section. Mainly when it wants previous employers, I will enter my current employer and it will put that info into all of the other previous employer fields. When I go to one of the other previous employer fields and change it to the correct info it changes all of the others to that information... I am very confused about what is going on and can't send in these apps because it shows that all precious employers are the same one...  Any help?  Thank you in advance

    This means that the form was not created correctly and all of those field names are the same. If you're able to edit the form in Acrobat, you can correct it by giving each field a unique name. If that's not possible, try to get the form corrected by whoever supplied you the form.

  • Auto fill the goods' storage location in sales order item

    Hi,
    I have a issue,When I use VA01 to create a sales order,I want to let the system auto fill the material storage location when I enter the material no. for the sales ITEM.
    How to do?I want use the userexit to do,the program 'MV45ATZZ' but I couldn't find where I can add my  code,Whether have other better way to do?
    Thanks

    Sorry,I use this user exit program 'MV45AFZZ'.
    source code like below,
    FORM USEREXIT_MOVE_FIELD_TO_VBAP.
    VBAP-zzfield = xxxx-zzfield2.
    *{   INSERT         KHDK900234                                        1
          If SVBAP-TABIX = 0.
         SELECT SINGLE LGORT FROM MARD INTO VBAP-LGORT
                              WHERE MATNR = VBAP-MATNR .
          endif.
    *}   INSERT
    ENDFORM.

  • How to fill the data in  extraction queue (LBWQ)?

    Hi,
    I modified the structure of datasource 2LIS_02_SCL (change an append structure), since an error occurs when I check the datasource, I deleted the the deltaqueue in RSA7, before that, I also checked the extractorqueue, it was empty.
    But when I excute OLI3BW to fill the extractor queue, it happens nothing.
    How can I fill the data in extractor queue so that I can extract data from R3 to BW?
    Thanks .
    Regards

    Whta u have done is Filling setup tables not the extractor queu......
    Could you please tell whether ur load is delta load or Full load?
    Khaja

  • I designer I want to create forms for web client, does each client have to purchase form central to access the data?

    I designer I want to create forms for web client, does each client have to purchase form central to access the data?

    Hi,
    In this scenario, you can share the document with the clients to and provide co-author privileges.
    Co-authors can edit the form design, options, responses, and summary report (everything that you can do).
    Note:- They do not require a paid subscription to view the responses, free subscription users can become co-authors.
    Please refer to the following thread to know how to share a form with others:-How do I share a form I created with others?
    Regards,
    Nakul

  • I want to fill the data source 0CO_OM_WBS_3 from COSP table.

    Hi,
    I am working on Plan and actual for cost controlling, I need to fill the data source with data from COSP table.
    Please give me the steps for this. I checked in RSA3 for data source it don't have any data, but the corresponding table COSP having data.a
    Thanks
    Durg

    Hi,
    See the following DataSources for requirements,
    0CO_OM_WBS_1                      WBS elements: Costs
    0CO_OM_WBS_2                      WBS elements: Budget
    0CO_OM_WBS_3                      WBS elements: Overall plan
    0CO_OM_WBS_4                      WBS elements: Statistical key figures
    0CO_OM_WBS_5                      WBS Elements: Selections
    0CO_OM_WBS_6                      WBS Elements: Actual Costs Using Delta Extraction
    0CO_OM_WBS_7                      WBS Elements: Commitment Line Items
    0CO_OM_WBS_8                      WBS Elements: Budget Line Items
    Use 0CO_OM_WBS_6 for Actual , bcoz it is having Delta Option for Plan you can go 0CO_OM_WBS_2 or 0CO_OM_WBS_3. See the SAP Help on that.
    http://help.sap.com/saphelp_nw04/helpdata/EN/08/47c6f8bc1db04a84c9185954208ee7/frameset.htm
    In this help you can find complete details of the Tables, you can see help for all above DataSources.
    Thanks
    Reddy

Maybe you are looking for

  • How can I sort my photos by title on the iPad

    Who kows, how I can sort my photos by title on my iPad. In my mac in iPhoto I can do so, and there are several options to sort. When I chose "sort by title on iPhoto, they are displayed in the wright way, but only on the mac not after sync. on my iPa

  • IPhoto shows "No Photos" when importing...

    iPhoto shows "No Photos" even when I have photos to import. If I restart the computer and then plug in my camera into the USB, iPhoto will pop up and show all the photos in my camera and import, but it only seems to do so immediately after restart. I

  • CM21 user defined field empty

    Dear guru , I need to add a new field in CM21 for the capacity requirements list. I have implemented user exit CYPP0005. I have added this field in structure CYUSER. I have used FM EXIT_SAPLCYPP02_001 to write the code  for populating the field with

  • Merge replication and Snapshot replication monitoring

    Hi All, I have mere publication with 56 subscriptions. I need to monitor their synchronization status twice in a day. I want to do it using TSQL. Like i will create a table for that and i will schedule a job, which inserts the replication status reco

  • GRC AC 10 Installation on Which System?

    Dear All, I am new to GRC and have been asked to install it at my current company.  I have done the training almost 2 years ago but haven't had the chance to use it until now. Apologies for the basic questions, I have searched but cant find a suitabl