It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to change Custom field date picker to appear as Month-Year

dhaval soni Jun 23, 2013

How to change default datepicker template to appear as Month-Year view only .

below is the template file for detault date picker custom field:

##disable_html_escaping() TODO REENABLE
$!{auiparams.put("controlHeaderClass", "aui-field-datepicker")}
#customControlHeader ($action $customField.id $customField.name $fieldLayoutItem.required $displayParameters $auiparams)
## Show the use checkbox field to use the current date/time when configuring the field in the admin section.
#if ($displayParameters.defaultScreen)
    <input class="text medium-field datepicker-input" id="$customField.id" name="$customField.id" type="text" value="$!value" />
    <a href="#" id="${customField.id}-trigger" title="$i18n.getText('date.picker.select.date')">
        <span class="aui-icon icon-date">$i18n.getText('date.picker.select.date')</span>
    </a>
    #datePopup(${customField.id} "${customField.id}-trigger" $dateTimeFormat $dateFormat $timeFormat $dateTimePicker $currentMillis $currentCalendar)
    <div class="checkbox field-default">
        #if($dateTimePicker)
            #set ($labelText = $i18n.getText('date.picker.config.default.datetime'))
        #else
            #set ($labelText = $i18n.getText('date.picker.config.default.date'))
        #end
        <input#if ($customField.customFieldType.isUseNow($config)) checked="checked"#end class="checkbox" id="useCurrentDate" name="useCurrentDate" type="checkbox" value="true" />
        <label for="useCurrentDate">${labelText}</label>
    </div>
#else
    <input class="text medium-field datepicker-input" id="$customField.id" name="$customField.id" type="text" value="$!value" />
    <a href="#" id="${customField.id}-trigger" title="$i18n.getText('date.picker.select.date')">
        <span class="aui-icon icon-date">$i18n.getText('date.picker.select.date')</span>
    </a>
    #datePopup(${customField.id} "${customField.id}-trigger" $dateTimeFormat $dateFormat $timeFormat $dateTimePicker $currentMillis $currentCalendar)
#end
#customControlFooter ($action $customField.id $fieldLayoutItem.fieldDescription $displayParameters $auiparams)
$!{auiparams.clear()}

I need to create custom field which can show only Month-Year instead of date.

Thank You

1 answer

0 votes
dhaval soni Jun 25, 2013

i m still looking on this.. any one possible solution ?

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Statuspage

⭐️Would you recommend Statuspage? Leave a (honest!) review. ⭐️

Hi Community friends, We're working on sourcing more reviews on Capterra – a popular software review site –  to help teams like yours make more informed decisions when choosing an inc...

63 views 3 5
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you