Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Customize Date Picker for Python Toolbox Parameters

$
0
0
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.

Code:

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.

Attachment 19403
Attached Thumbnails
Click image for larger version

Name:	DateSelection.PNG‎
Views:	N/A
Size:	122.4 KB
ID:	19403  

Viewing all articles
Browse latest Browse all 2485

Trending Articles