markieta

Customize Date Picker for Python Toolbox Parameters

Discussion created by markieta on Nov 19, 2012
Latest reply on Jun 18, 2014 by zen562
Hi all,

I have a Python Toolbox that converts a file geodatabase table to a format useful in external analysis. However, I would like to be able to export a subset of data by selecting a specific date on a calendar.

What I have now is a date selection calendar that I can use to select the appropriate date. What I would like is for the calendar to only make available to me the dates that are available in the param0 "DATE" column. See example code and screenshot below.

def getParameterInfo(self):
    param0 = arcpy.Parameter(displayName="Input Table",
                             name="in_table",
                             datatype="Table",
                             parameterType="Required",
                             direction="Input")

    param1 = arcpy.Parameter(displayName="Input Date",
                             name="in_date",
                             datatype="Date",
                             parameterType="Required",
                             direction="Input")


As you can see, there is only data available for 1/3/2012. I would like all calendar dates to be suppressed except for the those dates in the param0 "DATE" column.

[ATTACH=CONFIG]19403[/ATTACH]

Attachments

Outcomes