按钮像日历技巧 [英] Make buttons Like Calendar Trick

查看:100
本文介绍了按钮像日历技巧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我需要这个示例代码

我当天有2个变量,一个月的天数和每天的天数是实际的天数(星期日) = 1,星期一= 2,星期二= 3等等)



现在例如我有day = 30和dayofweek = 2这是星期一我有35个按钮以我的形式

我怎么能让它看起来像这样?



Hi guys , I need the sample code for this one
I have 2 variables the day which is the number of days in a month and the dayofweek which is the number of the actual day (sunday = 1, monday = 2, tuesday =3 and so on)

now for example i have day = 30 and dayofweek = 2 which is monday and i have 35 buttons in my form
How can i make it to look like this?

NULL  1   2   3    4    5    6 
   7  8   9   10   11   12   13
  14  15  16  17   18   19   20
  21  22  23  24   25   26   27
  28  29  30  Null Null Null Null





只要日期可点击,任何其他实施都被接受



注意:我需要代码导致我是初学者,我现在很难:D

谢谢



Any other Implementation is accepted as long as the dates are clickable

NOTE: I need the code cause im a beginner and im having a hard time for now :D
Thank You

推荐答案

你提出同样的问题更早,而且OriginalGriff为您概述了逻辑,但您没有尝试实现该逻辑。



所以我说:不,你不需要代码,因为你是初学者,但是你想要别人为你写代码,因为你太懒了,不能尝试做自己的工作。



通过编写一些代码来展示一些主动性。如果您无法按要求执行此操作,请寻求帮助以显示您的代码并按照您希望的方式解释不起作用。
You posed this same question ealier and OriginalGriff kindly outlined the logic for you, yet you have shown no attempt to implement that logic.

So I say: No, you do not need the code because you are a beginner, but you want some-else to write it for you because you are too lazy to make an attempt at doing your own work.

Show some initiative by writing some code. If you are unable to get it to perform as you want, then ask for help with showing your code and explaining what is not working the way you want it to.


这篇关于按钮像日历技巧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆