Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

jQuery Datepicker

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    jQuery Datepicker

    I've gotten the jQuery Datepicker to show up when I click an Input box, but whenever I select a date, the row is not marked as dirty, so the Save button does not become enabled. I see using firebug that some ajax is run when a different input box is changed. How can I get the same ajax to run when I select a date or close the jquery box? There is an onClose event that is fired when the datepicker is closed.

    Here is the script that is run:
    Code:
    http://localhost/jklive/__a5RunGrid.a5w?__pageName=tm_a5w_new_prospects.a5w&__gridFilename=tm_grid_new_prospects&__alias=PROSPECTS&__unsaved=no&KEYS.R1%5B%5D=2304&KEYS.R1%5B%5D=33602&V.R1.BIDDATE=02%2F14%2F2011&V.R1.CONTACT_ADDRESSLINE1=&V.R1.CONTACT_ADDRESSLINE2=&V.R1.CONTACT_ADDRESSZIP_FK=33607&V.R1.CONTACT_EMAIL=helpa&V.R1.CONTACT_EXTENSION=&V.R1.CONTACT_FAX=&V.R1.CONTACT_FIRSTNAME=R.%20Jordan&V.R1.CONTACT_LASTNAME=Megular
    &V.R1.CONTACT_PHONE=(813)-229-6511&V.R1.CONTACT_SALUTATION=Mr.%20Megular&V.R1.PROPOSAL_FK=0&V.R1.ZIPCODE=33602&__Ajax=true&__FormAction=refreshRow&__FormID=PROSPECTS&__Nulls_1=0%2C0%2C0%2C0%2C1%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C1%2C0%2C0%2C0%2C0%2C0&__methodType=controlDirty&__row=1&__si.FB=&__si.FL=&__si.FLSF=&__si.Filter_combined=&__si.GUID=c1b1f201-247b-4909-8d37-da77c05e17d4&__si.LogicalRecNo=1&__si.NestedGridName=&__si.PB=&__si.PL=&__si.Parameters_combined=&__si.QS=territory%3D1&__si.QS_LinkInfo=&__si.QS_LinkInfoCount=&__si.RecordCount=4089&__si.RowCount=1
    &__si.SaveDebugInfo=No&__si.Timer=False&__si.arguments=Territory%7C%7C1%0D%0A&__si.baseFilterReset=&__si.dtFmt=MM%2Fdd%2Fyyyy%200h%3A0m%20am&__si.gridQBE=&__si.initialized=True&__si.isNestedGrid=False&__si.lrn=1&__si.order=tm_prospects.LastCalled%0D%0A&__si.overrideSettings=P8%7D%3ExOjOy%7Bm%20JIw5c0%3B6b%C2%95j%3At'd%C2%8B%3C%24pSD)k%3E.*Q)%2F2%3F%5Bn60%3Ct%7Df(h7aP4-f3%C3%9E.F.%3D9w)l%3CA)%C2%96&__si.pageNumber=1&__si.rowsInEditMode=&__si.sortColumn=&__si.sortDirection=&a5DirtyRegions=PROSPECTS.R1
    &a5RegionsDirtyValues=V.R1.CONTACT_EMAIL&old.V.R1.BIDDATE=02%2F25%2F2011&old.V.R1.CONTACT_ADDRESSLINE1=&old.V.R1.CONTACT_ADDRESSLINE2=&old.V.R1.CONTACT_ADDRESSZIP_FK=33607&old.V.R1.CONTACT_EMAIL=help&old.V.R1.CONTACT_EXTENSION=&old.V.R1.CONTACT_FAX=&old.V.R1.CONTACT_FIRSTNAME=R.%20Jordan&old.V.R1.CONTACT_LASTNAME=Megular&old.V.R1.CONTACT_PHONE=(813)-229-6511&old.V.R1.CONTACT_SALUTATION=Mr.%20Megular&old.V.R1.PROPOSAL_FK=0&old.V.R1.ZIPCODE=33602&territory=1
    I'm assuming that there is an alpha function that is run to create that link. But I've been unable to find it.

    (FYI: The reason I'm not using the built in datepicker is because I'm eventually going to add in the timepicker as well.)

    #2
    Re: jQuery Datepicker

    I figured it out. I'll put a how to together in the next few days.

    Comment


      #3
      Re: jQuery Datepicker

      Thanks - interested in the time as well. Appreciated.
      Insanity: doing the same thing over and over again and expecting different results.
      Albert Einstein, (attributed)
      US (German-born) physicist (1879 - 1955)

      Comment


        #4
        Re: jQuery Datepicker

        Very Interesting how is the reaction time on month changes?
        Chad Brown

        Comment


          #5
          jQuery Datetimepicker HOW TO

          A few things you'll need:
          jQuery (www.jquery.com)
          jQuery UI (www.jqueryui.com)
          jQuery Timepicker Addon (http://trentrichardson.com/examples/timepicker/ or https://github.com/trentrichardson/j...mepicker-Addon)

          Some background: I'm using this in a few places in my application with more than one being on a page. It was working for me with both the standard jQuery UI Datepicker, as well as with the Timepicker Addon. The datepicker was just used when the mysql backend was a DATE type, the datetimepicker backend was a DATETIME type.

          First I made sure that I was including jQuery in my html head by using this code. It will first try to get jquery from Google's CDN, otherwise fallback to local js file. There are many pro's for this easily avaliable with a quick google search (http://www.google.com/search?q=jquery+google+cdn). Though this is probably more for public sites. I've also included jQuery UI (also using Google's CDN) and finally, the jquery-ui-timepicker-addon script.
          Code:
          <!-- Grab Google CDN's jQuery. fall back to local if necessary -->
          <script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.js"></script>
          <script>!window.jQuery && document.write(unescape('%3Cscript src="js/jquery-1.5.0.min.js"%3E%3C/script%3E'))</script>
          <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
          <script>!window.jQuery && document.write(unescape('%3Cscript src="js/jquery-ui.1.8.9.min.js.js"%3E%3C/script%3E'))</script>
          
          <script src="js/jquery-ui-timepicker-addon.js"></script>
          Second, jQuery needs to be in noConflict mode due to Alpha 5 using the $() shorthand. This needs to be done immediately (or close to it) after loading the jQuery script. Also, in this code I include a small function called jq(). This function is needed because Alpha 5 uses periods in ID names, which messes with the jQuery element selector code.
          Code:
          <script>
          var $j = jQuery.noConflict(true);
          function jq(myid) { 
             return '#' + myid.replace(/(:|\.)/g,'\\$1');
           }
          </script>
          Ok, that's all that's needed in the html header. On to the grid.
          For the normal Datepicker I didn't need any extra settings so I just used this code. Notice how I used the jq() function, that is the ID of the element when the page is published using firebug.
          Code:
          <script type="text/javascript">
          $j(jq('PROSPECTS.V.R1.BIDDATE')).datepicker({
          	onSelect: function(dateText, inst){
          		{grid.Object}.setValue('G','BIDDATE',1,dateText);
          	}
          });
          </script>
          I placed this code in the 'Below Grid' Freeform Edit Region for that grid.
          When I ran the grid it worked fine, updating the field as well as marking it dirty with the A5 ajax function.

          Then onto the datetimepicker... The ID of this one seemed to change because it was a Linked Content Grid inside of another grid. Specifically the ESMI part seems to be random letters that could possible change. I would love to find a way to perhaps specifiy this with something similar to the {grid.componentname}. In this example, when I put the code in the Freeform edit region it did not work, So I ended up putting the code in the Javascript - System Events under the 'onGridRender' section. I think this may be because it was a linked content section
          Code:
          $j(jq('PROSPECTS_LCS_ADMIN_TM_GRID_NEW_PROSPECTS_PANEL_ESMI_P1.V.R1.NEXTCALL')).datetimepicker({
          	ampm: true,
          	stepMinute: 10,
          	hourMin: 8,
          	hourMax: 17,
          	onClose: function(dateText, inst){
          		{grid.Object}.setValue('G','NEXTCALL',1,dateText);
          	}
          });
          I'm sure I've not done this the most efficient or effective way. Please improve, haha!

          EDIT: Also, I think you'll need to have a jQuery UI theme linked in the header like so:
          Code:
          <link href="css/redmond/jqueryui-1.8.9.css" type="text/css" rel="stylesheet" />

          Comment


            #6
            Re: jQuery Datetimepicker HOW TO

            Originally posted by Sparticuz View Post
            Specifically the ESMI part seems to be random letters that could possible change. I would love to find a way to perhaps specifiy this with something similar to the {grid.componentname}.
            Yep, they seem to be random. It is changing for me when I do most things, republish the grid, restart the server, pretty much everything. I'm looking for a way to specify the ID, or to determine what the ID will be at render. Any help would be appreciated.

            Comment


              #7
              Re: jQuery Datepicker

              nevermind
              Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

              Comment


                #8
                Re: jQuery Datetimepicker HOW TO

                Originally posted by Sparticuz View Post
                Yep, they seem to be random. It is changing for me when I do most things, republish the grid, restart the server, pretty much everything. I'm looking for a way to specify the ID, or to determine what the ID will be at render. Any help would be appreciated.
                haha, So apparently {grid.componentname} was exactly what I needed (kinda).

                Addendum to How-to:

                So after playing around with it this morning, I've decided the correct place for this code is in the onGridRender function of the Javascript - System Events. For specifying the ID of the item, you must write it like this
                Code:
                $j(jq('{grid.ComponentName}.V.R1.NEXTCALL')).datetimepicker({});
                The {grid.ComponentName} will give you the name of the grid. The V is always there. For my purposes, it is always R1, but there is a {grid.RowNumber} or a {grid.object}._selectedRow placeholder you can use. Then the final piece is, of course, the actual field name.

                Comment

                Working...
                X