Page tree
Skip to end of metadata
Go to start of metadata

Playground and DEMO space

This is a playground and demo space for ConfiForms and ConfiDoc addons developed and supported by Vertuna LLC

Most pages provide a storage format for the demo, so you can use the free add-on from Atlassian Confluence Source Editor to import this configuration into your Confluence and see it in action

Please note, all the examples here are provided without any obligation and may or may not be incomplete or may have bugs, and we provide NO SUPPORT for these examples and demos.


Please select your Start Date
Please select your End Date
   

 

Created dates

mydate

Apr 01, 2017
Apr 02, 2017
Apr 03, 2017
Apr 10, 2017
Apr 11, 2017
Jun 11, 2017
Jun 07, 2017
Jun 12, 2017
Jun 10, 2017
Jun 08, 2017
Jun 09, 2017
Jun 13, 2017
Jun 17, 2017
Jun 15, 2017
Jun 14, 2017
Jun 18, 2017
Jun 16, 2017
Jun 19, 2017
Jun 20, 2017
Jun 21, 2017
Jun 12, 2017
Jun 15, 2017
Jun 13, 2017
Jun 16, 2017
Jun 17, 2017
Jun 14, 2017
Jun 18, 2017
Jun 19, 2017
Jun 20, 2017
Sep 14, 2017
Sep 13, 2017
Sep 17, 2017
Sep 18, 2017
Sep 15, 2017
Sep 16, 2017
Sep 20, 2017
Sep 19, 2017
Sep 23, 2017
Sep 22, 2017
Sep 24, 2017
Sep 21, 2017
Sep 25, 2017
Sep 26, 2017
Sep 28, 2017
Sep 27, 2017
Sep 30, 2017
Sep 29, 2017
Oct 02, 2017
Oct 01, 2017
Oct 03, 2017
Oct 04, 2017
Oct 06, 2017
Oct 05, 2017
Oct 08, 2017
Oct 09, 2017
Oct 07, 2017
Oct 10, 2017
Jun 01, 2017
May 31, 2017
Jul 14, 2017
Jul 12, 2017
Jul 13, 2017
Jul 17, 2017
Jul 15, 2017
Jul 16, 2017
Jul 18, 2017
Jul 19, 2017
Jul 20, 2017
Aug 10, 2017
Aug 12, 2017
Aug 09, 2017
Aug 13, 2017
Aug 08, 2017
Aug 11, 2017
Aug 15, 2017
Aug 14, 2017
Aug 16, 2017
Aug 18, 2017
Aug 19, 2017
Aug 21, 2017
Aug 17, 2017
Aug 20, 2017
Aug 22, 2017
Aug 27, 2017
Aug 26, 2017
Aug 25, 2017
Aug 24, 2017
Aug 23, 2017
Aug 28, 2017
Aug 29, 2017
Aug 24, 2017
Aug 25, 2017
Sep 08, 2017
Sep 09, 2017
Sep 11, 2017
Sep 10, 2017
Nov 07, 2017

 

Storage format for the solution (make sure you change the "pageId" parameter from 11862909 to your pageId (of the page with the form))

 Click here to expand...
<ac:structured-macro ac:macro-id="f39dd63d-b332-4197-9f01-ad83d8dfbb46" ac:name="html" ac:schema-version="1">
  <ac:plain-text-body><![CDATA[<form class="aui" id="datesForm">
    <div class="field-group">
        <label for="dd-startDate">Start Date
            <span class="aui-icon icon-required">(required)</span></label>
        <input class="text medium-field" type="text"
               id="dd-startDate" name="dd-startDate">
        <div class="description">Please select your Start Date</div>
    </div>
    <div class="field-group">
        <label for="dd-endDate">End Date
            <span class="aui-icon icon-required">(required)</span></label>
        <input class="text medium-field" type="text"
               id="dd-endDate" name="dd-endDate">
        <div class="description">Please select your End Date</div>
    </div>
    
    <div class="buttons-container">
        <div class="buttons">
            <input class="button submit" type="button" value="Create" id="dd-save-button">
        </div>
    </div>
</form>
 
 
<script>
 AJS.$(document).ready(function() {
    AJS.$('#dd-startDate').datePicker({'overrideBrowserDefault': true});
    AJS.$('#dd-endDate').datePicker({'overrideBrowserDefault': true});
 
    AJS.$('#dd-save-button').click(function(){
      AJS.$('.reportedDate').remove();
      var datesBetween = getDates(convertToDate(AJS.$('#dd-startDate').val()), convertToDate(AJS.$('#dd-endDate').val()));
	  for (i=0;i<datesBetween.length;i++){
       var cd = datesBetween[i];
       AJS.$.ajax({
        url: 'https://wiki.vertuna.com/ajax/confiforms/rest/save.action?pageId=11862909&f=myform1&mydate=' + cd.getTime(),
        type: "GET",
        success: function (data) {
         showMessage(cd);
        }  
		});
      }
    });
});
 
Date.prototype.addDays = function(days) {
    var dat = new Date(this.valueOf())
    dat.setDate(dat.getDate() + days);
    return dat;
}
function getDates(startDate, stopDate) {
    var dateArray = new Array();
    var currentDate = startDate;
    currentDate = new Date(currentDate)
    while (currentDate <= stopDate) {
        dateArray.push( new Date (currentDate) )
        currentDate = currentDate.addDays(1);
    }
    return dateArray;
}
 
function convertToDate(dateAsString) {
  return new Date(dateAsString); // yy-mm-dd (which is ISO 8601)
}
 
function showMessage(dateToReport) {
  AJS.$('#datesForm').append('<div class="reportedDate aui-message aui-message-info closeable shadowed success"><p>Created record for: ' + dateToReport + '</p></div>');
}
</script>]]></ac:plain-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="f9697c13-23cf-41ee-9109-d5e69bc6cbc1" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">myform1</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="964d8753-caa0-427c-b192-76bdf14ce554" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">mydate</ac:parameter>
        <ac:parameter ac:name="fieldLabel">mydate</ac:parameter>
        <ac:parameter ac:name="type">date</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p> </p>
<p>Created dates</p>
<ac:structured-macro ac:macro-id="73a4277d-9627-414e-be24-c2e46f3162a0" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="formName">myform</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="285352b0-ad24-45d9-9a7d-4e62cbe51e2c" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">mydate</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>

  • No labels