Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: dsiable future selection in date input component.

  1. #1

    Default dsiable future selection in date input component.

    Hi Forum,

    I am using date input component to display my date .can any one suggest me how i can disable the future date selection in date input component.I have tried this funtion :
    $( "#render_SelectDate" ).datepicker({ maxDate: new Date() });

    Here SelectDate is the name of date input component
    But can't get any success.so plz suggest me any idea how we can control the selection of future date.

  2. #2
    Join Date
    Mar 2015
    Posts
    3

    Default

    Hi

    Under our CDF documentation there is a sample with a Date Input Component, in Public/plugin-samples/CDF/Documentation/Component Reference/Core

  3. #3
    Join Date
    Mar 2015
    Posts
    3

    Default

    Hi

    Under CDF documentation in our pentaho server you have a sample with the documentation of that sample.
    If you go to /Public/plugin-samples/CDF/Documentation/Component Reference/Core Components/DateInputComponent, you will find the sample with that component.

    For instance, defining this component via:

    myInput = {
    name: "myInput",
    type: "dateInputComponent",
    parameters:[],
    parameter: "input",
    htmlObject: "sampleObject",
    dateFormat: "yy-mm-dd",
    startDate: "2006-05-31",
    endDate: "2016-01-01",
    executeAtStart: true
    };

    You have two parameters to the component: startDate and endDate. Those two, define what is the start date and end date that will be possible to pick within the date picker.
    Linking with the date picker specification from, endDate maps to the http://api.jqueryui.com/datepicker/#option-maxDate, and this is the option you need to set on our component.

    Let me know if this helps!

  4. #4
    Join Date
    Mar 2015
    Posts
    3

    Default

    Hi

    Within our documentation samples in the pentaho server we have a sample with that use case.
    If you go to the Public/plugin-samples/CDF/Documentation/Component Reference/Core Components/DateInputComponent/ and open the sample, you have a sample with a Date Input Component documenting our parameters.
    For instance, while declaring the component:


    myInput = {
    name: "myInput",
    type: "dateInputComponent",
    parameters:[],
    parameter: "input",
    htmlObject: "sampleObject",
    dateFormat: "yy-mm-dd",
    startDate: "2006-05-31",
    endDate: "2016-01-01",
    executeAtStart: true
    };

    The startDate and endDate parameters are used to block the start and end date for the date picker.
    They are our mapping to the
    http://api.jqueryui.com/datepicker/#option-minDate and http://api.jqueryui.com/datepicker/#option-maxDate

    Also, on our component, if you use the TODAY string instead a date, the component will get the date for the current day and use that to block the date selection.

    Let me know if this helps.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.