Where The Streets Have No Name

sencha touch의 datepicker에서 월을 한글로 표시하기 본문

Developement/Mobile

sencha touch의 datepicker에서 월을 한글로 표시하기

highheat 2011. 8. 5. 15:59
Ext.setup({
    tabletStartupScreen: 'images/tabletStartupScreen.png',
    phoneStartupScreen: 'images/phoneStartupScreen.png',
    
    tabletIcon:"images/tabletIcon.png",
    phoneIcon:"images/phoneIcon.png",
    glossOnIcon: true,
    statusBarStyle:"black",
    fullscreen:true,
    preloadImages:[],
    scope:this,
    
    onReady: function () {

    	// 날짜포멧
    	Ext.apply(Ext.util.Format, {
    		defaultDateFormat: 'Y/m/d'
    	});
    	
    	var localMonthNames = ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'];
    	Date.monthNames = localMonthNames;
    	    	
    	new Ext.form.FormPanel({
            fullscreen: true,  
            scroll:"vertical",
           
            items: [{
                xtype: 'fieldset',
                title: 'checkbox,datePicker,<br/>select,textarea',
                instructions: 'instructions은 아래에 나타나는 내용~',
                defaults: {
                    // labelAlign: 'right'
                    labelWidth: '35%',
                    style: {
                        border:"1px solid #ff0000"
                    }
                },
               
                items: [
                    {
                        xtype: 'checkboxfield',
                        name: 'cool',
                        label: 'Cool',
                        checked:true
                    },
                    {
                        xtype: 'datepickerfield',
                        name: 'birthday',
                        label: 'Birthday',
                        picker: { 
                        	yearFrom: 1900,
                        	slotOrder: ['year', 'month' ,'day']
                        }
                    },
                    {
                        xtype: 'selectfield',
                        name: 'rank',
                        label: 'Rank',
                        options: [
                            {
                                text: 'Master',
                                value: 'master'
                            }, {
                                text: 'Journeyman',
                                value: 'journeyman'
                            }, {
                                text: 'Apprentice',
                                value: 'apprentice'
                            }
                        ]
                    },
                    {
                        xtype: 'hiddenfield',
                        name: 'secret',
                        value: false
                    }, {
                        xtype: 'textareafield',
                        name: 'bio',
                        label: 'Bio'
                    }
                ]
            }]
        })
    	
    }
});