def show_date(max_value="", min_value="",start_value="",is_required=True):
    require_checked = 'checked'
    if not is_required:
        require_checked = ''
    now = datetime.now()
    if not max_value:
        max_value = now + timedelta(days=180)
    if not min_value:
        min_value = now - timedelta(days=180)
    if not start_value:
        start_value = now
    max_value = max_value.strftime("%d/%m/%Y")
    min_value = min_value.strftime("%d/%m/%Y")
    start_value = start_value.strftime("%d/%m/%Y")
    html = r"<div class='datepicker_flexible_container'>Date: <input type='text' value='%s' class='datepicker' /><div>"\
           r"<div class='hideable datepicker_flexible_container' id='attributes'>"\
           r"From: <input type='text' value='%s' class='datepicker' /><br >"\
           r"To: <input type='text' value='%s' class='datepicker' /><br >"\
           r"Initial: <input type='text' value='%s' class='datepicker' /><br>"\
           r"Required: <input type='checkbox' id='is_required' %s/>"\
           r"</div>" % (start_value,min_value, max_value,start_value,require_checked)
    return html
dataset/ETHPy150Open sfdye/ntusurvey/survey/util.py/show_date/original