A working YUI Calendar With Spry Data

Hi,
I've seen a number of posts about linking Spry data with the YUI calendar widget.
Well I've done that here.  http://www.pwhitehurst.f2s.com/yui%20calendar.html. through a little perserverance and reading the Yahoo calendar API
The calendar dates are highlighted based on the event dates in the SPRY data.  I haven't added any other functionality yet as  I'm just taking it one step at a time.  But this page should give others the base code for getting started.  The key is to declare a YAHOO namespace so you can reference the calendar in your spry region postload notifications or other spry functions etc.
Any questions please reply and I'll see if I've worked it out.  I'm away over Easter but intend to add functionaility so that when you click a date on the calendar it filters the spry data via a non destructive filter etc. I also want the calendar to move to the right month as I click events.
Cheers
Phil

Thanks,
Unfortunatley my page hasn't gone live yet, so I can't show you what I mean, but I think I've found the problem.
I've managed to config the YUI calendar to accept dates in DD/MM/YYYY format (using some of the localisation features described on the Yahoo developers pages: http://developer.yahoo.com/yui/examples/calendar/germany.html) so now my calendar will accept and properly shade any date passed to it in DD/MM/YYYY format (which is what my spry dataset is in) and it will also return any date selected from the calendar in DD/MM/YYYY format, as it should. So, all good on the calendar front...
...but spry is still operating in standard MM/DD/YYYY mode, so if I set my "start_date" and "end_date" columns as type = "date" (which I want to do for sorting purposes) it doesn't recognise any date after the 12th day of the month! (because it still thinks the DD segment is a MM segment and so has a maximum poss value of 12! doh!). So far I've got around this by defining both date columns as "strings", so the combining function you describe above (much appreciated btw :-)) passes the date string to the calendar exactly as entered, and because my calendar is set up to recognise this date string, theres no problem, and i can shade any date in the calendar (including the 13th to the 31st!)
so the only problem i have now is being able to sort my dates. one solution seems to be to have 2 columns - one with the date in DD/MM/YYYY format which is used for display (as it is now) and another in american MM/DD/YYYY format which is used to sort, but this seems to me a bit of a waste of time, and theres always the possibility that one column will have an error in it, especially since I'm not used to working in the american format.
sorry, a bit of a ramble there. I suppose my question is this: is there a simple step i'm missing where I can tell spry that my date columns are in a specific format? ie. dd/mm, not mm/dd?
something like:
var ds1 = new.Spry.Data.HTMLDataSet("myData.html", "table1", {sortOnLoad: "start_date", sortOrderOnLoad: "ascending"});
ds1.setColumnType("start_date", "date", {format:dd/mm/yyyy});
if not, there really should be!
*any admins reading, mental note for the next release please...! :-)*
I suppose i could give in and convert all my dates to the american system which would solve all the problems, but i never like being bullied by the Yanks!

Similar Messages

  • Accordion with spry data on IE8

    Hi,
    I have an accordion with spry data and everything works fine on IE8 and FF, but on IE8 when i click on a accordion tab it doesnt focus on that open panel. It takes me at the very top of where my accordion begins. I notice the same thing happens to the accordion with spry data site. It's a problem for me because my page has a long accordion and our users have small laptop screens. Does anyone know how this can be fixed in IE8?
    Sorry i dont have a sample link or code, because it's on our company intranet. but i used the exact same method on the spry accordion with data page.
    http://labs.adobe.com/technologies/spry/samples/accordion/AccordionSample2.html
    thanks!

    Good. I am sure you can figure it out.
    http://labs.adobe.com/technologies/spry/articles/pager/index.html
    Let us know.
    Donald Booth
    Adobe Spry Team

  • How to i add an image path with spry data set

    hi
    how to i add an image path with spry data set. I made a xml file and then created a data set in html but image won't load
    this is my XML
    <?xml version="1.0" encoding="UTF-8"?>
    <banner width = "185" height = "400">
        <item>
            <image scr = "nui-panforte-recipe_01.jpg" ></image>
            <description>CHOC-COCONUT PANFORTE</description>      
            <text1>Try this delicious GLUTEN FREE Christmas treat</text1>
            <text2>CHOC-COCONUT PANFORTE</text2>
        </item>
    </banner>
    this is my HTML
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="../../SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="../../SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var ds1 = new Spry.Data.XMLDataSet("recipe_banner.xml", "banner/item");
    //-->
    </script>
    </head>
    <body>
    <div spry:region="ds1">
      <table>
        <tr spry:repeat="ds1">
          <td>{image}</td>
          <td>{description}</td>
          <td>{text1}</td>
          <td>{text2}</td>
          <td>{text3}</td>
          <td>{text4}</td>
          <td>{link}</td>
          <td>{url}</td>
          <td>{target}</td>
        </tr>
      </table>
    </div>
    </body>
    </html>

    It would be helpfull if you actually created an <img> tag to start with
    <img src="{image/@src}" />
    would work.

  • Working with spry data sets

    Hi,
    I have page that uses a spry data set called 'dsSupport',
    however i do not want to use a table to select the item in the list
    i am instead using a spry select box:
    <div spry:region="dsSupport">
    <h1>Step1: Select your product:</h1>
    <form id="form1" name="form1" method="post" action="">
    <p><strong>Choose from a
    list:</strong><br />
    <span id="spryselect1">
    <label>
    <select name="prodlist" id="prodlist">
    <option spry:repeat="dsSupport" spry:setrow="dsSupport"
    value="{model}">{name}</option>
    </select>
    </label>
    <span class="selectRequiredMsg">Please select an
    item.</span>
    </span>
    </p>
    </form>
    </div>
    This is connected to a spry detail region so i can pull up
    more details from the data set, but when i change the option in the
    select box nothing happens. Is this possible? If so can anyone
    help!
    If i drop a spry table in to the div tag as well i can select
    the items in there and the detail region does change so i know its
    linked ok and all the table items are showing in the select box, i
    just cannot get it to change when i select something different in
    the select box!

    fixed it using:
    <select spry:repeatchildren="dsSupport"
    spry:choose="choose" name="prodlist"
    onChange="dsSupport.setCurrentRow(this.selectedIndex);">
    <option spry:when="{ds_RowNumber} ==
    {ds_CurrentRowNumber}" selected="selected">{name}</option>
    <option spry:default="default">{name}</option>
    </select>

  • Calendar with unsorted data

    Hi All,
    I am using apex 3.1.2.00.02 on oracle 10g. I am having an issue with the report calendar. The report works fine, except that the data column value switches day by day. It appears random. An example is that on 03-Apr-09 the data is 23 and 24 but on 04-Apr-09 the data is 24 and 23
    My query is
    SELECT eventdate, e.workid
    FROM MTS_CONTRACT_WORK W, MTS_CONTRACT_EVENTS E
    WHERE W.WORKID = E.WORKID AND
    E.CONTRACTID = :P212_CONTRACTID
    ORDER BY EVENTDATE, e.WORKID
    Any help would be appreciated.
    Regards Matt Y

    Hi All,
    I am using apex 3.1.2.00.02 on oracle 10g. I am having an issue with the report calendar. The report works fine, except that the data column value switches day by day. It appears random. An example is that on 03-Apr-09 the data is 23 and 24 but on 04-Apr-09 the data is 24 and 23
    My query is
    SELECT eventdate, e.workid
    FROM MTS_CONTRACT_WORK W, MTS_CONTRACT_EVENTS E
    WHERE W.WORKID = E.WORKID AND
    E.CONTRACTID = :P212_CONTRACTID
    ORDER BY EVENTDATE, e.WORKID
    Any help would be appreciated.
    Regards Matt Y

  • Using alternate rows with Spry Data Set

    Can anyone provide more information on how to implement alternate row colors with a Spry Data Set?  What I have done is:
    Create spry data set using HTML page as the data set
    The html page that displays the data set is:  <div spry:region="equipment">
    In the default.css page that is linked, I added the info in note #1 below
    When the page displays, no colors appear. Tried changing the colors and still no luck.  Is there another step to do?
    Note #1:
    within the default.css, the following are declared:
    #equipment odd {
    background-color: #CCC;
    #equipment even {
    background-color: “#F2F2F2;
    Note #2:
    Here is a link to see the actual pages referenced above.
    Any ideas? Getting frustrated!!  Thanks in advance for any advice.

    You are going to kick yourself, but, you haven't assigned any page element the ID #equipment. The region is called that but the table or the DIV does not have an idea and your selector matches nothing...

  • How to create a category/sucategory list with spry data

    I am trying to create a a menu list that looks like this using spry:
    Category Name
    subcategory1
    subcategory2
    subcategory3
    my mysql query is:
    SELECT myp_category_cat.idmnu_cat, myp_category_cat.category_cat, myp_subcat_sct.subcat_sct, myp_subcat_sct.id_sct FROM (myp_category_cat LEFT JOIN myp_subcat_sct ON myp_subcat_sct.idcat_sct=myp_category_cat.id_cat) WHERE myp_category_cat.idmnu_cat=1
    i have ben trying to use xpath filtering but i am getting an error. My datasets look like this:
    var dsCategories = new Spry.Data.XMLDataSet("myincludes/categories.php", "export/row/category", {sortOnLoad: "category", sortOrderOnLoad: "ascending", distinctOnLoad: true});
    var dsList = new Spry.Data.XMLDataSet("myincludes/categories.php", "export/row/subcat");
    now i try to combine like this but getting error:
    <div spry:region="dsCategories" class="SpotlightAndStacked">
      <div spry:repeat="dsCategories dsList" class="SpotlightAndStackedRow">
        <div class="SpotlightContainer">
          <div class="SpotlightColumn"> {category} {subcat} </div>
        </div>
        <br style="clear:both; line-height: 0px" />
      </div>
    </div>
    i am now getting a failed to retrieve dataset. Both dataset work perfectly when not combined.

    You have to declare all your SPRY Datasets in the region:
    div spry:region="dsCategories dsList" class="SpotlightAndStacked">
    Kevin

  • Calendar with preselected dates based on current date

    Can we get the calendar to be prepopulated with todays' date and today-7 date as the default before it starts running the initial queries when I log into dashboard.
    I have a calendar date range based on which my chart displays metrics. If I dont choose anything its picking up all the data first before I choose something
    Your help is always appreciated.

    I apologize I read your post too quickly and misunderstood your question. Unfortunately, I thought you were referring to a dashboard you had created and asking about setting up default dates for your bind variables/parameters.
    Well I'll have to leave this one to someone else. Sorry I couldn't be more help.
    David

  • Sync work iPhone calendar with personal Google calendar

    I just received a work iPhone (5S iOs 8.1.3) which has events pushed to the calendar from Outlook.  The connection to our work email/calendar server is managed through our IT department and I can't tap into that connection on my personal devices.  I am looking to sync the work events to my personal calendar so I can see the calendar when I'm not near my work phone.  I was hoping that since the calendar is on the device that there was an app or a feed that can be used to link to Google.  NOTE: I'm only looking to view the work calendar and not push meetings to it from Google.
    Everything I've read gets close to answering this but not matching the scenario completely.  The overwhelming advice I see is "just use Google as the default" which isn't an option for me since I don't control the work calendar.

    I feared that.   Part of me was just hoping that the answer wasn't there due to bad posts with little detail.

  • How do you set up Paged View with Spry Data Sets

    Hope someone can help. I have constructed a Spry data set using a html table and want  to use the paged view javascript to limit the amount of rows displayed on one page at a time to 10 then forcing a new page. Have found the java script file in the spry 1.6 download and attached it to the spry assets folder and have followed the instructions found at the Adobe development center   http://labs.adobe.com/technologies/spry/articles/pager/index.html        with no luck. Have attached  files to show what I have done. If someone could look at this and point out my error or suggest a better way I would be grateful. I am not a code warrior so simple  instructions would be so helpful. Many thanks in advance.
    Here is the code
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryHTMLDataSet.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryPagedView .js"></script>
    <link href="SpryAssets/SpryMasterDetail.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    var ds1 = new Spry.Data.HTMLDataSet("table.html", "ds1", {sortOnLoad: "Name", sortOrderOnLoad: "ascending"});
    ds1.setColumnType("Phone", "number");
    var pv1 = new Spry.Data.PagedView( ds1 ,{pageSize: 10});
    //-->
    </script>
    </head>
    <body>
    <input type="button" value="First" onclick="pv1.firstPage();" />
    <input type="button" value="Prev" onclick="pv1.previousPage();" />
    <input type="button" value="Next" onclick="pv1.nextPage();" />
    <input type="button" value="Last" onclick="pv1.lastPage();" /
    <div class="MasterDetail">
      <div spry:region="ds1" class="MasterContainer">
        <div class="MasterColumn" spry:repeat="ds1" spry:setrow="ds1" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">{Name}</div>
      </div>
      <div spry:detailregion="ds1" class="DetailContainer">
         <div class="DetailColumn">{Name}</div>
        <div class="DetailColumn">{Product}</div>
        <div class="DetailColumn">{Contact}</div>
        <div class="DetailColumn">{Phone}</div>
      </div>
      <br style="clear:both" />
    </div>
    <input type="button" value="First" onclick="pv1.firstPage();" />
    <input type="button" value="Prev" onclick="pv1.previousPage();" />
    <input type="button" value="Next" onclick="pv1.nextPage();" />
    <input type="button" value="Last" onclick="pv1.lastPage();" /
    </body>
    </html>

    Your region needs to refer to the pageview, not the dataset.  Your paged view var is already looking at/pulling in the ds.
    I would change the following code:
    <div spry:detailregion="ds1" class="DetailContainer">
         <div class="DetailColumn">{Name}</div>
        <div class="DetailColumn">{Product}</div>
        <div class="DetailColumn">{Contact}</div>
        <div class="DetailColumn">{Phone}</div>
      </div>
    to read the following:
    <div spry:region="pv1">
    <table>
    <tr spry:repeat="pv1">
    <td>{Name}</td>
    <td>{Product}</td>
    <td>{Contact}</td>
    <td>{Phone}</td>
    </tr>
    </table>
    Regards,
    Michael

  • Paging of accordion with spry data

    Hello everyone !
    It is possible to paginate
    this
    example in order to show a specific number of accordion divs
    per page ?
    I've tried to insert and adapt the
    Massimo
    Foti's spry data paging but without success considering that
    I'm not very familiar with javascript.
    Thanks,
    Gabetu

    Good. I am sure you can figure it out.
    http://labs.adobe.com/technologies/spry/articles/pager/index.html
    Let us know.
    Donald Booth
    Adobe Spry Team

  • Tabbed Panels: Opening panel with panel number doesn't work with Spry Data

    I have some data inside a TabbedPanelsContent div, and would
    like to be able to open tabs using links, but it only seems to work
    with static content.
    Clicking on tabs themselves loads content correctly, whereas
    clicking on links does nothing. I tried both - panel number and
    panel ID - neither worked. What gives?
    See code below.
    <div spry:region="ds1">
    <div class="TabbedPanels" id="tp1">
    <ul class="TabbedPanelsTabGroup">
    <li class="TabbedPanelsTab" tabindex="0">Asset
    Management</li>
    <li class="TabbedPanelsTab"
    tabindex="0">Brokerage</li>
    <li class="TabbedPanelsTab" tabindex="0">Mutual
    Funds</li>
    </ul>
    <div class="TabbedPanelsContentGroup">
    <div class="TabbedPanelsContent">
    <p spry:repeat="ds1"
    spry:test="'{@industry01}'.search(/^Asset Management/) !=
    -1;">{ds1::client}</p>
    </div>
    <div class="TabbedPanelsContent">
    <p spry:repeat="ds1"
    spry:test="'{@industry02}'.search(/^Brokerage/) !=
    -1;">{ds1::client}</p>
    </div>
    <div class="TabbedPanelsContent">
    <p spry:repeat="ds1"
    spry:test="'{@industry03}'.search(/^Mutual Funds/) !=
    -1;">{ds1::client}</p>
    </div>
    </div>
    </div>
    <script type="text/javascript">
    var tp1 = new Spry.Widget.TabbedPanels("tp1");
    </script>
    </div>
    <a href="#" onclick="tp1.showPanel(0); return
    false;">Asset Management</a>
    <a href="#" onclick="tp1.showPanel(1); return
    false;">Brokerage</a>
    <a href="#" onclick="tp1.showPanel(2); return
    false;">Mutual Funds</a>

    Try to declare the variable out side of the region
    <script> var tp1;</script>
    <div spry region ... >
    tab panel stuff
    <script type="text/javascript">
    tp1 = new Spry.Widget.TabbedPanels("tp1");
    </script>
    </div>

  • Working with Spry Data Elements

    As I understand it, I have to format elements such as dates,
    currency, etc. myself. Can someone can tell me how to manipulate
    the data elements in Spry (JS/DOM/?). I don't (necessarily) need
    date and currency examples, just something simple to get me
    started.
    For instance, I would like to alter the way {currency} and
    {date} appear below:
    <tr spry:repeat="dsList">
    <td>{currency}</td>
    <td>{date}</td>
    </tr>
    Currently, this is pretty ugly...
    <tr spry:repeat="dsList">
    <td>2006-10-02 10:18:35.983</td>
    <td>16500000.0000</td>
    </tr>
    Any JS example will help me... for instance, the code adding
    one (+1) to the currency value would get me through this;)
    Not vital to this question, but this is a cfquery that's
    using Raymond Camden's toXML component (which rocks) to convert my
    queries to XML variables for Spry.
    many thanks...

    Nevermind... I figured it out.
    I simply added the following code in between the query object
    and the conversion to xml:
    <cfif len(myQuery.date)>
    <cfoutput query="myQuery">
    <cfset query.date=DateFormat(query.date,"mm/dd/yyyy")/>
    </cfoutput>
    </cfif>
    Raymond's toXML
    http://ray.camdenfamily.com/projects/toxml/
    Maybe it'll help someone else ;)

  • Spry collapsible panel with spry data

    I have created a spry collapsible panel and wanted to put
    srpy data in it, to dynamically load.
    i also want to hide the entire panel if no data is available.
    It will show the data, but the click to open/close does not
    work.
    here is the code.

    I have made some progress, thanks, however im still getting
    some odd formatting issues, for example, the 1st panel shows with
    different design to the rest of the panels.
    this is my code;
    <div id="region" spry:region="ds1">
    <div id="repeat" spry:repeat="ds1">
    <div id="CollapsiblePanel{ds_RowID}"
    class="CollapsiblePanel">
    <div class="CollapsiblePanelTab"
    tabindex="{ds1::ds_RowID}"> <h1>{title} - last amended
    {amended}</h1></div>
    <div
    class="CollapsiblePanelContent"><strong>{message}</strong>
    Added by <strong>{owner}</strong> on
    <strong>{added} </strong>(REF:
    <strong>{id}</strong>) <a href="/service/index.asp"
    target="_self">View full details</a></div>
    </div>
    <script type="text/javascript">
    <!--
    var CollapsiblePanel{ds_RowID} = new
    Spry.Widget.CollapsiblePanel("CollapsiblePanel{ds_RowID}");
    //-->
    </script>
    As you can see, I am inserting {ds_RowID} in the variable
    name, in order for the panels to operate independantly, however
    have I coded it correctly?

  • 9320 BBM and Email not working on wifi with valid data subscrition

    Hi!
    Please I need your help.
    My phone is a blackberry curve 9320. I have a valid data plan back home in my country that expires 7th July 2013. While abroad I intended to wifi for BBM. However, this has not been possible for though connected to wifi BBM and my email do not work. Other applications namely facebook and whatsapp work very well. I am also able to get on the internet. Please urgent help needed.

    I believe there is a problem at  RIM at the BIS data level I have reported it to my network operator and they tell me they are dealing with Blackberry with the issue. Suggest you report it to your operator as well the more report the problem hopefully the quicked it will get fied.

Maybe you are looking for

  • Crash report for message below re updting iweb/crashes/iphoto also crashes

    Here is the crash report for the 'problem' with iweb & iphoto - under question below this one..... updating iweb/crashes/iphoto also crashes.... Date/Time: 2007-05-03 16:07:41.295 +0100 OS Version: 10.4.9 (Build 8P135) Report Version: 4 Command: iWeb

  • Noise when using ext dvi monitor

    when i plug in my dvi monitor i get loud sound interferrence through my ext speakers plugged into my mbp. if i turn off the seocnd monitor or unplug the dvi cable the noise is gone. This has nothing to do with the cpu

  • Someone is sending texts from a different phone

    How do I stop someone from sending texts from my number?  They've hacked my account. I even changed mu number and said person found me again. Help!

  • Access to AFP mount freezes task

    Hi, I'm experiencing a really strange problem. I have three iMacs, all backing up with time Machine onto a MacMini with Mavericks Server installed. One of those iMacs sometimes reaches a point, when it cannot finish a backup. It just stops! When that

  • Flash content rendering on FireFox on Mac

    Hello, I have a expanding ad test page which works fine on Windows IE and FireFox, but on FireFox on Mac, the clipping doesn't work properly, you will see the stuff on the expanded area after the ad is collapsed. Anyone knows what could caused this p