_xiaofang/xiaofang/Assets/Script/UI/DateItem.cs

28 lines
658 B
C#
Raw Normal View History

2024-11-29 09:44:45 +08:00
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 = "ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: " + selectedDate.ToString("yyyy<79><79>MM<4D><4D>dd<64><64>");
}
}