Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Selectfeld mit Jahr Monat Datum

 
Post new topic   Reply to topic    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
truemaster
Smarty n00b


Joined: 08 Mar 2019
Posts: 2

PostPosted: Fri Mar 08, 2019 9:28 am    Post subject: Selectfeld mit Jahr Monat Datum Reply with quote

Hallo zusammen,

kann mir jemand sagen, wie ich mit einer Schleife zb die Jahre in einem Formular in Select packen kann? Also zB Startjahr und Endjahr. Muss das Selectfeld so haben, damit ich es noch mit CSS stylen kann.

Meine ganzen Ansätze klappen nicht. Selbst, wenn ich die Daten in ein Array packen möchte siehe Bsp.

Code:


$iTag = 1;
while ($iTag <= 31)
{
    $hallo[] +=   $iTag;
   
   $iTag++;        // es wird $i in Array gepackt
    // Wert wird um 1 erhöht
}

$smarty->assign('test',$hallo);
   
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1555

PostPosted: Fri Mar 08, 2019 5:49 pm    Post subject: Reply with quote

Use an actual calendar library. There's plenty available in JS.
Your approach simply can not work, not supposed to.

Also, this is not a Smarty question.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP