This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Aug 2, 2013, 6:49 PM
11 Posts

Setting Dojoattributes for Date

  • Category: Dojo and Client Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: Dojo
  • Replies: 1

I have to set min and max value for a date control, below is my code:

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xc="http://www.ibm.com/xsp/custom"
    xmlns:xe="http://www.ibm.com/xsp/coreex" dojoParseOnLoad="true"
    dojoTheme="true">

<xe:djDateTextBox id="djDateTextBox1">
    <xp:this.dojoAttributes>        
        <xp:dojoAttribute name="constraints" value="{min:'2013-08-02', max:'2013-08-16'}"></xp:dojoAttribute>
    </xp:this.dojoAttributes>
    </xe:djDateTextBox>
</xp:view>

I want to set min and max values dynamically based on the selection of a date field on my existing xPage. I am trying to get values using CSJS but struggling with the syntax :( please help me.

Aug 3, 2013, 11:54 AM
54 Posts
Dojo

You have to assign a javascript date object.

In a button you can test it with code like this:

min = new Date("2013 07 31,12:52:39");

dijit.byId("#{id:djDateTextBox1}").constraints.min=min;

 

I don´t know if this will works with the extension library. I don´t use it.


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal