전체 글(809)
-
Sencha panel에 html을 사용하여 이미지 나오게 하기
Ext.application({ name: 'ImageApp', launch: function () { Ext.create('Ext.container.Viewport', { layout: 'fit', items: [ { xtype: 'panel', title: 'Image Display', html: '' } ] }); }});
2024.12.05 -
Sencha treepanel row 선택하기
Row ID로 선택하기// Assuming your TreePanel is already created and has an id or referenceExt.onReady(function () { var treePanel = Ext.getCmp('myTreePanel'); // Replace 'myTreePanel' with your TreePanel's id // Get the selection model var selectionModel = treePanel.getSelectionModel(); // Find a node by id or some other identifier var node = treePanel.getStore().getNodeById('desiredNod..
2024.12.05 -
Javascript 시간 더하기
function addMinutesToCurrentTime(minutesToAdd) { const now = new Date(); // Get the current date and time now.setMinutes(now.getMinutes() + minutesToAdd); // Add 15 minutes return now;}// Example usageconst updatedTime = addMinutesToCurrentTime(15);console.log(updatedTime.toLocaleTimeString('en-US', { hour12: false })); // Example output: "15:30:00" (24-hour format)
2024.12.05 -
Javascript 현재 시간을 15단위로 표시하기
function getCurrentTimeRoundedTo15Minutes() { const now = new Date(); // Get the current hour and minute const hours = now.getHours(); const minutes = now.getMinutes(); // Round minutes to the nearest 15-minute increment const roundedMinutes = Math.round(minutes / 15) * 15; // Handle overflow of minutes (e.g., 60 minutes = next hour) const adjustedHours = (roundedMinutes ..
2024.12.05 -
Sencha timefield의 값과 표시를 분리하기
Ext.define('MyApp.view.TimeFieldExample', { extend: 'Ext.form.Panel', xtype: 'timefield-example', title: 'TimeField with Binding', width: 300, bodyPadding: 10, viewModel: { data: { timeValue: null, // Holds the actual time value timeText: '' // Holds the display text } }, renderTo: Ext.getBody(), items: [ { xtype: '..
2024.12.05 -
Javascript 모든 항목 replace 하기
let str = 'HH24:MI:SS HH24';str = str.replace(new RegExp('HH24', 'g'), '15');console.log(str); // Output: '15:MI:SS 15'
2024.12.05