_xiaofang/xiaofang/Assets/Script/UI/DateItem.cs
2024-11-29 09:44:45 +08:00

28 lines
658 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DateItem : MonoBehaviour
{
public Text dateText;
CalendarPanel calendarPanel;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void OnDaySelected(int day)
{
DateTime selectedDate = new DateTime(calendarPanel.currentDate.Year, calendarPanel.currentDate.Month, day);
calendarPanel.selectedDateText.text = "Ñ¡ÔñµÄÈÕÆÚ: " + selectedDate.ToString("yyyyÄêMMÔÂddÈÕ");
}
}